You have
Me.dispose()
Me.close()
Interchange the two
Me.close()
Me.dispose()
and
Application.exit()
should work as well
Question
How do I get an application to close itself?
At the moment, I have the following:
Private Sub Form1_Load()
'do something first
Me.Dispose()
Me.Close()
End Sub
When I double click the .exe, the application seems to work fine, but I can still see an instance of it in the Windows Task Manager Processes tab.
How do I get it to close itself properly?
Solution
You have
Me.dispose()
Me.close()
Interchange the two
Me.close()
Me.dispose()
and
Application.exit()
should work as well
OTHER TIPS
Have you tried Application.Exit()?
Private Sub ButtonClose_Click()
Application.Exit
End Sub