Jasmine
Jasmine

Reputation: 5326

How to ensure only one instance of an winform application C#

I dont know how to create a winform application which has only one instance anytime. Could someone please help me how to do that ?

Upvotes: 1

Views: 874

Answers (1)

Sasha
Sasha

Reputation: 8860

Use Mutex class http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx It is allowed to create only one instance of Mutex with same name on a machine.

Upvotes: 2

Related Questions