0

My program is windows form, when built in visual studio, gives an .exe file for the form. And when this .exe file is clicked multiple times, creates multiple instances of the same form. All the programming is done in one class only. how to solve this? when the program is already open, how to stop it from opening the form again when the .exe file is clicked again?

  • https://msdn.microsoft.com/library/8fz4ssw2(v=vs.100).aspx – Steve Jan 21 '16 at 09:42
  • got it, thanks a lot. :) – Saiful Aman Rifat Jan 21 '16 at 09:51
  • Possible duplicate of [prevent a c# application from running more than one instance](http://stackoverflow.com/questions/3545240/prevent-a-c-sharp-application-from-running-more-than-one-instance) – Steve Jan 21 '16 at 15:11
  • The proper way to do this is with a Mutex, not using the single instance flag. That does more than you think and I would suggest it is NEVER used. – Steve Jan 21 '16 at 15:12

0 Answers0