Search code examples
vb.netsingle-instance

How to make sure that there is one instance of the application is running


I want to check when the user double click on applictaion icon that no another instance of this application is already running.

I read about My.Application but i still don't know what to do.


Solution

  • The most common pattern for doing this is to use the Singleton pattern. As you haven't indicated a language, I'm going to assume that you are referring to C# here - if not, the principles are still the same in most OO languages.

    This article should give you some help.