|
-
Nov 17th, 2000, 10:26 AM
#1
Thread Starter
Evil Genius
Sorry to be a pain, I know there has been a post on this before, but can't find it.
I heard that the end statement was old and is not the best way to stop your vb app from running. Can anyone tell me what you should use to end your app please?
Many thanks!
-
Nov 17th, 2000, 10:31 AM
#2
Fanatic Member
If what you're talking about is just closing the program, basically you can unload all the active forms or the main MDI form.
-
Nov 17th, 2000, 10:52 AM
#3
-
Nov 17th, 2000, 10:59 AM
#4
Thread Starter
Evil Genius
a little confused
Thank you Yonatan, that was the one I was looking for.
So which is best...
1) End
2) Call Unload(Me)
3) Set Frm = Nothing
Do these not just do exactly the same thing?
(pardon my ignorance if they are completly different, I have always been told to do the end one).
-
Nov 17th, 2000, 11:25 AM
#5
Frenzied Member
Nope, don't use the end one, use Unload Me.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 17th, 2000, 11:27 AM
#6
Frenzied Member
Why End is so bad,everybody's telling not to use End,
WHY??????????
-
Nov 17th, 2000, 02:24 PM
#7
Fanatic Member
Because End simulates the effect of you just pressing the Stop button, which means that if you had any code if Form_Unload, Form_QueryUnload or Form_Terminate then it will not be executed. This would waste memory if you had any class modules initialised but not terminated, and could cause a you GPF if you were Subclassing or Hooking and the call that stops that was in, for example, Form_Unload.
That's why it's bad.
Done.
Ok.
-
Nov 18th, 2000, 11:41 PM
#8
I use all of them, but than again, that's just me .
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
|