how to prevent application to run more than one instance ?

  • Thread starter Thread starter Daylor
  • Start date Start date
Use this code on Main()

Dim m as new Mutex(false, "_MUTEX")
if m.WaitOne(1,false) = false then Return

HTH
 
* "Kovan said:
have a look at singleton pattern technique

This may prevent the "user" from creating more than one instance of a
class, but it won't prevent him/her from starting more than one instance
of the application.
 
Back
Top