|
-
Oct 30th, 2000, 10:52 PM
#1
Thread Starter
Member
I'm using the Unload Me command to exit the program. The program closes but doesn't actually exit (using ctrl-alt-delete, the program shows as still running).
I'f never run into this problem with other programs i've developed.
Any suggestions?
-
Oct 30th, 2000, 11:03 PM
#2
Code:
Unload Me
Set Form1 = Nothing
End
-
Oct 31st, 2000, 07:28 AM
#3
Guru
End is evil!
Click this smile icon:
-
Oct 31st, 2000, 08:53 AM
#4
Addicted Member
Hi,
you shoud be carefull because when you see this type of error, it usually means that something is working wrong !
Do you have "For ever" loops in your applcation, ie : are you purely programming with events and function or do you have functions that never exit your code ? This could be a reason that the form is always loaded into the Forms collection...
Also, is there a possibility that your programm calls for graphical controls on your form after the form unload as been called ? If so, the form WILL BE RELOADED.
Do some testing, put a break point into your form load event and close your application...
Hope I helped...
P.S. Do you speak french ( bonjour !!!) because if so, I could write it down in french, I'am from Québec Canada...
-
Oct 31st, 2000, 08:56 AM
#5
transcendental analytic
Yonatan, End is used to end applications, all apps arent always bound to forms and objects.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 31st, 2000, 09:01 AM
#6
transcendental analytic
BTW, search all doevents statement and make emergency exits on at least the most your fequently used loops, for instance:
Code:
Do
'code
Doevents
Loop While Forms.count
and
Code:
Do
'code
Doevents
If forms.count=0 then exit do
'code
Doevents
Loop While Forms.count
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 31st, 2000, 09:21 AM
#7
Addicted Member
Hey guys...
Normally, applications should exit when there is no more forms in the Forms collections. That the way it's meant to be and it's the cleanest way to close an application.
When I see the END statement in someone's application (at work or else), 2 things run into my mind :
1) " Wow this guy really wanted me to know he was a VB programmer !!! "
2) " Now, what was going so bad in this application that the guy decided to PATCH a clean unload with the END statement ? "
There is something wrong into this application "Bonjour", think about it...
-
Oct 31st, 2000, 10:38 AM
#8
transcendental analytic
Hmm, and three more hmm's
i did some tests again, none of the objects declared in standard modules unloads correctly, when you close the last form. Thats exactly the same symptoms as caused by End. Unload statement is Evil! Nah, But think about it, Standard Modules surely must be evil, if you use them, i can't think of a better way to end your app, without manually unloading all objects and variables in that module.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 31st, 2000, 10:50 AM
#9
Hyperactive Member
What about this?
maybe and just maybe you have one form not visible, that´s
what happend to me once, i was opening another form to
display some information and y simply hide it after that
but when i use the Unload Me statment the app continue
runnig, until i found that mistake...
Saludos...
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
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
|