private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (!closeForReal && settings.HideOnClose) { e.Cancel = true; this.Hide(); notify.Visible = true; if (settings.FirstTimeHide) { notify.ShowBalloonTip(1000, "Note!", "The application window has been closed, but the application itself is still running", ToolTipIcon.Info); notify.BalloonTipTitle = "Note!"; settings.FirstTimeHide = false; } return; } settings.saveSettings(); UserActivityHook.UnHook(); }
private void Form1_Load(object sender, EventArgs e) { actHook = new UserActivityHook(); actHook.SetHook(); }