I have written an application for a customer and they have by mistake opened the package several times on there machine. How can i check to see if my app is already running and then activate it.
Printable View
I have written an application for a customer and they have by mistake opened the package several times on there machine. How can i check to see if my app is already running and then activate it.
VB Code:
' Check for a previous instance of the application If App.PrevInstance Then ' Display message to the user and terminate this instance Call MsgBox ... End 'Terminate the application End If
I'd check for App.PrevInstance in a Sub Main on startup and use an Exit Sub rather than an End.
http://www.vbworld.com/api/tip125.htmlQuote:
Originally posted by GUILogic
How can i check to see if my app is already running and then activate it.