-2

Possible Duplicate:
Run one instance from the application

let's suppose i make an application in C#(winforms), we can run multiple instances of the same application by just running the exe[clr], i want that there should be only one instance allowed... i think its close to the defination of SDI [single document interface]... how to do it.

Community
  • 1
  • 1
Moon
  • 19,518
  • 56
  • 138
  • 200

1 Answers1

4

You should use a Mutex to check for just one instance, like explained here: Using Mutex to force only one instance of Form and here Creating a single-instance application

Rubens Farias
  • 57,174
  • 8
  • 131
  • 162