110,533
社区成员
发帖
与我相关
我的任务
分享
private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
contextMenuStrip1.Show(Cursor.Position);
}
}
private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
switch (e.Button)
{
case MouseButtons.Left:
notifyIcon1.ContextMenuStrip = contextMenuStrip1;
break;
case MouseButtons.Right:
notifyIcon1.ContextMenuStrip = contextMenuStrip2;
break;
default:
notifyIcon1.ContextMenuStrip = null;
break;
}
}