|
-
Jan 10th, 2000, 10:43 PM
#1
Thread Starter
Member
The Doevents thing is preventing my form from unloading.
Is there a way to unload a form nicely while a While/Doevents/Wend loop is running, or is there a better substitute altogether?
Thanks.
------------------
-
Jan 10th, 2000, 10:51 PM
#2
PowerPoster
Try to do it like this:
-
Public Sub Main()
Dim Active as Boolean
Active = true
While Active
'Code here
DoEvents
Wend
End Sub
-
Just call Main after starting the program and if you want to exit set Active to False.
------------------
Fox
[email protected]
http://gigotz.tsx.org
...
Every program can be reduced to one instruction which doesn't work.
[This message has been edited by Fox (edited 01-11-2000).]
-
Jan 10th, 2000, 10:57 PM
#3
I hope this will work. didnt tested yet..
Private Sub Command1_Click()
dim i as integer
while not i = 1000
i = i + 1
call unloadform()
doevents
wend
end sub
private function unloadform()
unload form
end function
-
Jan 10th, 2000, 11:56 PM
#4
Hyperactive Member
Use a boolean, set to true in the form unload, and check in the loop if the bool is true, if so, exit the loop
-
Jan 11th, 2000, 05:25 AM
#5
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
|