private void Form1_Resize(object sender, EventArgs e) ...{ if (this.WindowState == FormWindowState.Minimized) ...{ this.ShowInTaskbar = false; this.Visible = false; this.notifyIcon1.Visible = true; this.notifyIcon1.ShowBalloonTip(2000, "BalloonTip Title", "Hello BalloonTip...", ToolTipIcon.Info); this.notifyIcon1.BalloonTipClicked += new EventHandler(notifyIcon1_BalloonTipClicked); this.notifyIcon1.Click += new EventHandler(notifyIcon1_Click); ContextMenuStrip context = new ContextMenuStrip(); context.Text = "Context Menu"; context.Name = "Context Menu Strip"; context.ShowImageMargin = false; ToolStripMenuItem tool = new ToolStripMenuItem(); tool.Name = "Tool Strip Menu Item"; tool.Text = "Exit"; context.Items.AddRange(new ToolStripMenuItem[] ...{ tool }); tool.Click += new EventHandler(tool_Click); this.notifyIcon1.ContextMenuStrip = context; } } void tool_Click(object sender, EventArgs e) ...{ this.Close(); } void notifyIcon1_Click(object sender, EventArgs e) ...{ NotifyIcon nIcon = (NotifyIcon)sender; nIcon.GetType().InvokeMember("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, nIcon, null); } void notifyIcon1_BalloonTipClicked(object sender, EventArgs e) ...{ MessageBox.Show("You just click the BalloonTip..."); } private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) ...{ this.Visible = true; this.WindowState = FormWindowState.Normal; this.ShowInTaskbar = true; this.notifyIcon1.Visible = false; }