how to prevent application to run more than one instance ?

C

Corrado Cavalli [MVP]

Use this code on Main()

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

HTH
 
H

Herfried K. Wagner [MVP]

* "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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top