|
-
Dec 5th, 2000, 09:52 AM
#1
Thread Starter
Hyperactive Member
When exit my App it still remainding in the Task List.
Any idea about it?
Ulises Vázquez
[size=1.7]Oracle DBA Certified Professioanl
Visual Basic 6 Developer
Crystal Reports Designer
[/size]
-
Dec 5th, 2000, 09:58 AM
#2
Frenzied Member
how are you ending it?
use END
if your using that then it should terminate it
-
Dec 5th, 2000, 10:05 AM
#3
NEVER USE END BY ITSELF
Sorry, but the MSDN Library says so itself .
Use this code:
Code:
Private Sub UnloadAllForms()
Dim Form As Form
For Each Form In Forms
Unload Form
Set Form = Nothing
Next Form
End Sub
-
Dec 5th, 2000, 10:24 AM
#4
Frenzied Member
hmm
so we dont use END at all or before or after unloading all?
-
Dec 5th, 2000, 10:32 AM
#5
PowerPoster
End stops execution right then and there, not allowing for any "housekeeping", if you do use end, throw it in the form query unload event, after matheews code.
-
Dec 5th, 2000, 01:09 PM
#6
Well, the END statement can be used. But in the MSDN Library, it says, "Never required by itself" or something like that. End won't end the program, resources that your program is using will still be there. The UNLOAD statement will clear up any resources used by the form and unload the form.
Set Form = Nothing
..can be used as well.
And as Lethal said, End can be put after all that code.
Code:
Private Sub UnloadAllForms()
Dim Form As Form
For Each Form In Forms
Unload Form
Set Form = Nothing
Next Form
End
End Sub
I usually do something like:
Unload Me
Set Form1 = Nothing
End
I like to use them all .
But never use End by itself!
-
Dec 5th, 2000, 01:24 PM
#7
Hyperactive Member
End Terminates execution immediately. Never required by itself but may be placed anywhere in a procedure to end code execution, close files opened with the Open statement and to clearvariables.
End Function Required to end a Function statement.
End If Required to end a block If…Then…Else statement.
End Property Required to end a Property Let, Property Get, or Property Set procedure.
End Select Required to end a Select Case statement.
End Sub Required to end a Sub statement.
End Type Required to end auser-defined type definition (Type statement).
End With Required to end a With statement.
Read into it what you will. What I think it says is DON'T USE IT!
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
|