How to prevent your app from staring a second instance of itselt?


Sometimes you don't want your program to be run in more then one instance. It is a very simple procedure to prevent multiple instances and it goes like this:
In the main form's load event...

If App.PrevInstance then
'Maybe tell the user that another instance is not allowed
end
End If


Mail to Daniel Wiman <daniel@wimania.com>
Online since June 1996, updated 971102
<- The VB home
<- Daniels homepage