Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow only one application instance

I'm sorry about my title may be it make you confusing (it's just I don't know what words should I use). My problem is I don't want to allow user to open my application multiple time. Please help. Thank you in advance.

like image 587
Norak Avatar asked Apr 24 '13 15:04

Norak


People also ask

How do I restrict an app to one instance?

One of the most common reasons to limit the number of instances is to restrict the access to some sensitive resources. For this purpose, we use the Mutex object. This approach can be used on all three types of desktop applications (console, winforms, WPF).

What is a single instance application?

A Single Instance application is an application that limits the program to run only one instance at a time. This means that you cannot open the same program twice.

How do I block multiple instances of a program in Windows 10?

Disable multiple instances of app. In order to disable multiple instances of an app on Windows 10, you need to install a free app called SingleInstance. Go ahead and download, and run the app. The app, by default, has one app pre-configured and that's the Calculator app on Windows 10.

How do I run a single instance of the application using Windows Forms?

Just go to the project properties and click the "Single Instance Application" checkbox.


1 Answers

Use the “Make single instance application” flag; in the solution explorer, right-click the project and select properties. See this question for more details.

MSDN documentation here.

Screenshot:

enter image description here

like image 107
Geoff Avatar answered Oct 20 '22 18:10

Geoff