Exiting from a menu
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I have a program that acts just like the right button off the mouse on top of the desktop, it only appears a menu... here's the code: Private Sub Form_Load() Me.Hide Me.PopupMenu ExecMenu Unload Me End Sub Private Sub mnuDebug_Click() MsgBox "debug" Unload Me End Sub Private Sub mnuRun_Click() MsgBox "run" Unload Me End Sub ----------------------------------------------------- I want the program to exit when the ESC key is pressed or when the program lost the focus, just like a normal menu... The line: Unload Me in Form_Load works well in the IDE but when I build the exe it stop working... How can I exit my program the way I want?