Advertisement
Guest User

Untitled

a guest
Mar 13th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using System.Windows.Forms;
  6. using System.Threading;
  7.  
  8. namespace MouseFixer
  9. {
  10.     static class Program
  11.     {
  12.  
  13.         static Mutex pmu;
  14.  
  15.         /// <summary>
  16.         /// The main entry point for the application.
  17.         /// </summary>
  18.         [STAThread]
  19.         static void Main()
  20.         {
  21.  
  22.             // Console.WriteLine("Hello");
  23.            
  24.             try
  25.             {
  26.                 Mutex.OpenExisting("MouseFixer");
  27.  
  28.                 MessageBox.Show("MouseFixer is already running", "", MessageBoxButtons.OK, MessageBoxIcon.Stop);
  29.                 return;
  30.             }
  31.             catch
  32.             {
  33.                 pmu = new Mutex(true, "MouseFixer");
  34.             }
  35.  
  36.             Application.Run(new TheContext());
  37.  
  38.         }
  39.  
  40.  
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement