AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

How can I detect whether my program is already running?

Visual Basic has a function called 'PrevInstance'. If the same program is started twice, this Boolean will have the value 'True'. If the program has only been started once, this Boolean will have the value 'False'. If you want your program to end, if the same program has already been loaded, just add this line to your program:

Private Sub Form_Load()
If App.PrevInstance Then End
End Sub

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/