|
-
May 30th, 2001, 11:55 AM
#1
Thread Starter
Member
Exiting a program?
How do you exit a program, for example if I have an Exit menu command what code do I use to exit the program?
-
May 30th, 2001, 11:58 AM
#2
_______
<?>
'Unload all forms
Public Sub UnloadFrms
Dim Form As Form
For Each Form in Forms
Unload Form
Set Form = Nothing
Next Form
End Sub
'in your unload event exit menu
Call UnloadFrms
If you have loaded any objects you should
Close them and set them to nothing as well
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
May 30th, 2001, 12:02 PM
#3
What HeSaidJoe described is the best way to exit, it releases all memory used by your app then common (and incorrect) way to exit is to use:
-
May 30th, 2001, 02:20 PM
#4
Originally posted by rsitogp
What HeSaidJoe described is the best way to exit, it releases all memory used by your app then common (and incorrect) way to exit is to use:
It's not incorrect, you just should never use it alone. So with Wayne (HeSaidJoe)'s code, you can always put it after the Next.
-
May 30th, 2001, 02:32 PM
#5
Actually, it's the other way around. Joe's way is correct, and using End is incorrect. This is because End does not trigger any of the unload events. You can however, as Matthew Gates suggested, used End after you finish using Unload.
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
|