-
I'm confused about the form1.show and form1.hide.
Example:
On Form1 there is one button and a textbox (Form1.Text1).
If you click on the button it calls Form2.Show.
On Form2 there is one button and a textbox (Form2.Text1).
If you click on the button it takes the text from Form2.Text1 and puts it in Form1.Text1 and calls Form2.Hide.
Now my question is this. If you compile this application as .exe, run it, and call the Form2.Show and Form2.Hide, it seems like you can never close it completely.
If you press control+alt+delete you can still see it in the Close Program Dialog. And if you run it multiple times you can see it multiple times in the Close Program Dialog.
Is there any better way to "open/close" a form so this doesn't happen?
Thanks.
%jeremy
-
Load/Unload
Use Load Form2 and Unload Form2
to load and unload them into/from the memory!
Well, Load Form2 is not neccesary, because when you do Form2.Show it automaticly loads it into memory, but when doing Form2.Hide, it only hides it ;)
[Edited by Jop on 09-07-2000 at 01:45 PM]
-
Ok, I've tried that. Like this:
Form2.Load (get's compile error)
Do you have a snip of code for an example?.. I have The Visual Basic Bible as reference and couldn't find anything about Load/Unload.
Thanks.
%jeremy
-
-
=). thank you, you've been helpful.
Solution: (Thanks to Jop - whos reply I didn't read completely =).)
To avoid formentioned problem the following code should be used.
Load Form2 ' this line is optional
Form2.Show
Form2.Hide
Unload Form2
Thanks.
%jeremy
-