我已经分配了这个:
// notifyIcon_Closed
//
this.notifyIcon_Closed.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon_Closed.Icon")));
this.notifyIcon_Closed.Text = "Ico";
this.notifyIcon_Closed.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_Closed_MouseClick);
//
然后在我的 Form 类中,我有:
private void notifyIcon_Closed_MouseClick(object sender, MouseEventArgs e)
{
MessageBox.Show("Clicked");
}
通知图标可见;但是,当我单击它时,什么也没有发生。我很迷茫。我忽略了一些简单的事情吗?