/// <summary>
/// When minisize the m_form.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Form1_SizeChanged(object sender, System.EventArgs e)
{
//hide the m_form and show the icon when the Form is minisized.
if (this.WindowState == FormWindowState.Minimized)
{
this.ShowInTaskbar = false;
notifyIcon1.Visible = true;
}
}
/// <summary>
/// click the icon.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void notifyIcon1_Click(object sender, System.EventArgs e)
{
//hide the icon
notifyIcon1.Visible = false;
//m_form is normal.
this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true;
}