private void Form1_Resize(object sender, System.EventArgs e) {
if (this.WindowState == FormWindowstate.Minimized) {
this.Visible = false;
this.notifyIcon1.Visible = true;
}
}
private void notifyIcon1_Click(object sender, System.EventArgs e) {
this.Visible = true;
this.WindowState = FormWindowstate.Normal;
this.notifyIcon1.Visible = false;
}