C#, single-instance-check using mutex. Implements a static function to be called in Program::Main().

/ Published in: C#
Save to your folder(s)

Scott Hanselman describes a method of using VB libraries to handle single-instance checking to prevent multiple instances of an app from starting. A mutex seems to be a simpler solution.\r\n\r\nAdd this class as a sibling to Main and then, inside Main, call this static member: SingleInstanceCheck.Check();

URL: http://www.hanselman.com/blog/TheWeeklySourceCode31SingleInstanceWinFormsAndMicrosoftVisualBasicdll.aspx

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.