Windows Forms Tip - To Ensure only one instance of your Application is running at a time

In some scenarios, you may wish to ensure that a user can run only one instance of your application at a time. Besides ensuring that only a single instance of your application is running, you may also want to bring the instance already running to the front and restore it, if it is minimized. First, to ensure that only one instance of your application is running at a time, the best method I've found is to create a mutex that is held by the operating system. This will put a request to the operating system that a mutex be created if one does not already exist. Only one mutex can ever be created at a time, so if you request a new one and it cannot be created, you can safely assume that your application is already running. Snippet below:
    static class Program
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
            bool createdNew;
            System.Threading.Mutex m = new System.Threading.Mutex(true, "Your Application Name here", out createdNew);

            if (!createdNew)
                MessageBox.Show("Another instance of this application is already running.");

            Application.Run(new Form1());