how do i know the program has been running when the user click on the short cut to run it again? and how can i show a form from the program after i know that it is already running and is hiding?
Printable View
how do i know the program has been running when the user click on the short cut to run it again? and how can i show a form from the program after i know that it is already running and is hiding?
If you want to check for previous instance of the application is running try using the following code example in the Load event of your startup form or in the Main sub.
Private Sub Form_Load()
If App.PrevInstance Then
MsgBox "App already running", vbExclamation, "Bye bye!"
End 'can't use the Unload statement in the Load event
End If
End Sub
Good luck!
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
Thank you very much!!!