notifyIcon 双击问题
主窗体隐藏的时候,双击开启主窗体,已经开启的将其置在顶曾.和MSN的操作一样.
private void notifyIcon1_DoubleClick(object sender, EventArgs e)
{
ShowMainForm(sender, e);
}
private void ShowMainForm(object sender, System.EventArgs e)
{
this.Show();
this.Activate();
}
左击和右击一样都显示标签.这个怎幺做
------解决方案--------------------private void notifyIcon1_Click(object sender, EventArgs e)
{
NotifyIcon nIcon = (NotifyIcon)sender;
nIcon.GetType().InvokeMember( "ShowContextMenu ",
BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, nIcon, null);
}