static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); /*---------------Auto Start Code-----------------*/ string keyname = "ShortcutUIv1.exe"; string assemblyLocation = Application.ExecutablePath.ToString(); //Assembly.GetExecutingAssembly().Location; AutoStart.SetAutoStart(keyname, assemblyLocation); /*---------------Auto Start Code-----------------*/ FrmMain frm = new FrmMain(); new Controller(); }
private void FrmMain_Closed(object sender, System.EventArgs e) { FrmMain.UnregisterHotKey(this.Handle, this.GetType().GetHashCode()); }