Single instance of an Application in C#??
Hello,
I have created a windows form application in C#. Now i want only a single instance of the application to be running at a time. Lets say I am using the following command to run a new application:
Application.Run(new Form1());
The above line is written in the main method.
How do i make sure that Application.Run() is executed only once, i.e. I want to make sure that a new instance of the form is not created as long as the application is running.
Could anyone help me with this?
Thanks,
Rohan.