|
This[^] will convert it for u.
"If our Mind can, the Program can !!" ≡ ░Ŗổђầŋ٭ ≡
|
|
|
|
|
|
Hi all,
I was wondering if anyone knew of a relatively easy way to draw a random line through a value of X on a graph.
I then need to pull two points from the line.
None of this needs to be graphical or even displayed i just need the points as text output to be use later.
Any ideas at all would be greatly appreciated.
|
|
|
|
|
Use random numbers
Dim rnd As Random
s = rnd.Next()
Gg
|
|
|
|
|
thats not exactly what I meant
I'm not looking for truly random numbers
I'm looking for 2+ random points on a line that intersects x at a given point
|
|
|
|
|
If you generate the equation of the line, you can sub x values back in and calcualte y values.
e.g.
y = x + 2<br />
Say x = 2<br />
y = (2) + 2<br />
y = 4<br />
Therefore the point = (2,2)
Looks easy on paper, yet i imagine it's somewhat more difficult to accomplish in code. Hope this gets you started.
Posted by The ANZAC
|
|
|
|
|
hi,
i have application in which No MDI form present.My problem is that i found one icon for each open form when i press ALT + Tab keys. However all form (Except main form) ShowInTaskBar property is set to false.
i want to show only single icon for my application (whether one or multiple form is open)when user press ALT + TAB keys to switch between multiple application.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
If u r asking for same icon for all the forms in ur application.
then u need to choose a common icon for all forms.
Is this what u r asking for???????
|
|
|
|
|
hi Nilish ,
i m not asking same icon for all the forms.
My Problem is that when I press ALT+TAB key then there r more than one icon in SWITCH WINDOW for my application. No. of icons in SWITCH WINDOW is equal to opened form in my applicaton. How can i prevent this thing .
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Rupesh , I think u need to take the MDI .Then u don't even need to set the ShowInTaskbar property to true.
|
|
|
|
|
hi nilish,
my main form contains some container control .so i can not change the main form to MDI.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Sory Boss, I can't help u in getting rid of icon to appear in the switch window.
For that u need to wait for people like christian Graus , Kubben etc...... to join this thread
|
|
|
|
|
hi Rupesh,
which method do you use for opening forms!?
you should use showdialog() instead of show() method
|
|
|
|
|
hi dear,
Thank you very much.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Is there a way in VB.NET 2005 to close all forms (or hide) except the one that is being loaded, without typing a load of code to hide each form?
Cheers
|
|
|
|
|
I don't remember off the top of my head, but I think you can loop through all of the Form objects and hide all but the one you want to keep open. Hope this starts you off on the right foot...
|
|
|
|
|
The Application object has a property that lists all open forms, you can iterate over that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What do you mean, application.exit.... something??? Im not a wiz at vb by the way, just a beginner!
|
|
|
|
|
harveyhanson wrote: Im not a wiz at vb by the way, just a beginner!
This makes me question what you're really trying to do with this.
The Application object has a collection called OpenForms . All you need to do is iterate over this collection and call Hide on each form, taking care not to hide the form you want to show.
For Each f As Form in Application.OpenForms
' Make sure we're not hiding the form this code is on...
If f Is Not Me Then
f.Hide
Next
Next
|
|
|
|
|
The aim is to make a goodbye screen, but at the mo it is just over the top of the current form, whereas i want that to be the only form shown!
I will have a go with this statement
|
|
|
|
|
Then that's what you do. After that, you can wait a little bit, then call Application.Exit.
|
|
|
|
|
Dave Kreskowiak wrote: For Each f As Form in Application.OpenForms
' Make sure we're not hiding the form this code is on...
If f Is Not Me Then
f.Hide
Next
Next
That was what I was thinking of yesterday when I replied in the earlier post...
|
|
|
|
|
is this the exact code i should use?
I have tried it and i get how it works, but i am getting an error on "not me" bit, and why is there 2 nexts, wouldnt one just create the loop?!
|
|
|
|
|
That first Next should be an "End If" actually.
You should NEVER just copy and paste code. Try and understand any examples and write your own. There's too many "Copy'n'Paste" programmers out there clogging up the forums.
|
|
|
|
|
Dont worry, i am just trying out code really, not copying and pasting and leaving it that way.
Still, what is the "not me" bit about?
|
|
|
|