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.
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

robertkjr59 reputationPosted Nov 19, 2004, 11:30 AM EST
rmuzumdar5 reputationPosted Nov 19, 2004, 11:39 AM EST
robertkjr59 reputationPosted Nov 19, 2004, 12:00 PM EST
rmuzumdar5 reputationPosted Nov 19, 2004, 10:52 PM EST