static void Main() { Application.ApplicationExit += new EventHandler(Program.OnApplicationExit); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Show the system tray icon. using (ProcessIcon pi = new ProcessIcon()) { pi.Display(); leapMotionGestureControl = new LeapMotionGestureControl(); // Make sure the application runs! Application.Run(); } }