How to minimize a Form to System Tray on Closing Event in .NET
Please HELP.....
How to minimize a Form to System Tray on Closing Event in .NET
Please HELP.....
Add a NotifyIcon control to the form and an event handler for FormClosing:
private void Form1_FormClosing(Object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.Visible = false;
this.notifyIcon1.Visible = true;
}
}