3 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for Reverend Jim

Sometimes you want to ensure that only one copy of a script can be run at time. Windows provides a facility called a mutex and you can use it to prevent multiple instances. To create the mutex, all I have to do is varname = GetMutex() If the mutex already …

1
2K
Member Avatar for mike_2000_17

Hi all! This is a simple piece of code that I wrote about a year ago, in response to a question on Daniweb. I decided to infuse it with some C++11 magic, which led to a pretty sweet code snippet, full of neat little techniques you might want to use, …

Member Avatar for mike_2000_17
3
1K
Member Avatar for Momerath

This snippet shows how to use Mutex to prevent multiple copies of your software from running. For a WinForms application, this code goes into the Program.cs file. The magic starts in line 14 where we attempt to create a Mutex. A Mutex is a form of a lock, but it …

Member Avatar for CsharpChico
5
546

The End.