Click here to Skip to main content
16,018,529 members
Articles / Programming Languages / C#

Run only one instance from you program

Rate me:
Please Sign up or sign in to vote.
4.83/5 (6 votes)
24 Sep 2010CPOL 6.5K   2  
Use this function in Program.Main()private static bool IsAlreadyRunning(){ //Find name of current process string currentProcessName = Process.GetCurrentProcess().ProcessName; //Find the name of all processes having current process name Process[]...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Indra Italia s.p.a
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions