How do I detect if my program is already running?

The App object in Visual Basic has a PrevInstance property that can be checked to see if the program already has an instance running. The code is as follows:

If App.PrevInstance = True Then
    MsgBox("The program is already running!")
    End
End If

You should include this code in the load event of the startup form, or the Main procedure in a module.


Arcade Games | Credit Repair Card Processor | Discount Window Shades | Increase Webmaster Revenue | Team Building Camps and Seminars