111,093
社区成员




this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.CloseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.CloseToolStripMenuItem,
this.ShowToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(100, 48);
//
// CloseToolStripMenuItem
//
this.CloseToolStripMenuItem.Name = "CloseToolStripMenuItem";
this.CloseToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
this.CloseToolStripMenuItem.Text = "Close";
this.CloseToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItem_Click);
//
// ShowToolStripMenuItem
//
this.ShowToolStripMenuItem.Name = "ShowToolStripMenuItem";
this.ShowToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
this.ShowToolStripMenuItem.Text = "Show";
this.ShowToolStripMenuItem.Click += new System.EventHandler(this.ShowToolStripMenuItem_Click);
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
private void CloseToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void ShowToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Show();
}
private void notifyIcon1_DoubleClick(object sender, EventArgs e)
{
this.Show();
}
private void Form5_DoubleClick(object sender, EventArgs e)
{
this.Hide();
}
public const int WM_NCLBUTTONDBLCLK = 0xA3;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_NCLBUTTONDBLCLK)
{
this.Hide();
return;
}
base.WndProc(ref m);
}