dlacaille / clever-dock

A modern dock for Windows
MIT License
93 stars 28 forks source link

Limit the application to a single process #3

Closed domialex closed 6 years ago

domialex commented 9 years ago

You should use a Mutex to limit the application to a single process. If 2 clever-docks are running, things get buggy.

bool instanceResult;
var mutex = new System.Threading.Mutex(true, "uniqueName", out instanceResult);
if (!instanceResult)
    // Close app.