private void Alerts_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.WindowState = FormWindowState.Minimized;
}
}
Monday, May 17, 2010
How to minimize window from closing C# windows application
To minimize the window when user closes the form, use the code below.
Labels:
C#,
Windows Application
Subscribe to:
Posts (Atom)