|
-
Sep 7th, 2000, 12:23 PM
#1
Thread Starter
Lively Member
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
-
Sep 7th, 2000, 12:34 PM
#2
Frenzied Member
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]
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 7th, 2000, 12:48 PM
#3
Thread Starter
Lively Member
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
-
Sep 7th, 2000, 12:54 PM
#4
Frenzied Member
I said:

not:
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 7th, 2000, 01:12 PM
#5
Thread Starter
Lively Member
=). 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
-
Sep 7th, 2000, 01:24 PM
#6
Frenzied Member
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|