how to limit app to one instance?

R

Ron

Hello,

Is there a property I can set in my vb.net project for
limiting the number of instances of the app to one? Like
if the app is already running, don't start another
instance if someone clicks on a shortcut or the exe
again. If there is not a property for this, what is the
code to achieve this?

Thanks,
Ron
 
R

Ron

Thanks all. That is exactly what I was looking for (even
the C# example - will eventually start migrating stuff
over that way).

Thanks again!
 
H

Herfried K. Wagner [MVP]

Ron said:
Is there a property I can set in my vb.net project for
limiting the number of instances of the app to one? Like
if the app is already running, don't start another
instance if someone clicks on a shortcut or the exe
again. If there is not a property for this, what is the
code to achieve this?

How do I make sure that only one instance of my application runs at a time?
<URL:http://www.yoda.arachsys.com/csharp/faq/#one.application.instance>
 

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