当用户按住 ctrl 按钮并单击 NotifyIcon 时,我正在尝试运行不同的代码。
我的代码不起作用,但我觉得它清楚地解释了我何时尝试这样做。这是在鼠标单击事件下。
Private Sub NotifyIcon_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs) Handles NotifyIcon.MouseClick
If (e.Modifiers = Keys.Control) Then
MsgBox("CTRL was pressed !")
Else
MsgBox("CTRL was not pressed !")
End If
End Sub