dorival Level: Trainee
 Registered: 14-02-2006 Posts: 3
|
Vb6 Problem
I'm new with vb and I creted my first program, it's working well, but when I close it and press Ctrl + Alt + Del it is still there in the programs list as if it was still open, if I open the program and close again and press Ctrl + Alt + Del it will be shown twice in the list, it looks like the program i hidden when I close it, but never closes.
I tryed using some codes like this to close all forms, but I don't know wht's the problem.
Can anyone help me?
Dim f As Integer
f = Forms.count
Do While f > 0
Unload Forms(f - 1)
If f = Forms.count Then Exit Do
f = f - 1
Loop
or
Public Sub UnloadAllForms(Optional FormToIgnore As String = "")
Dim f As Form
For Each f In Forms
If f.Name <> FormToIgnore Then
Unload f
Set f = Nothing
End If
Next f
End Sub
|