Allows Only One Instance of your App (Alternative Method)
Version Compatibility: Visual Basic 6, Visual Basic 5
This snippet uses the FindWindow API function to prevent a second instance of your application from starting, as opposed to using app.PrevInstance, which is the standard way. To use it, add a module to your application and set Sub_Main as the startup object.
Instructions: Copy the declarations and code below and paste directly into your VB project.