【バックアップ】パレットコントロールアイコン左クリック表示メニュー
2232 ワード
Private Sub NotifyIcon1_MouseClick(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseClick
Select Case e.Button
Case Windows.Forms.MouseButtons.Left
'
'
'ContextMenuStrip1.Show(Cursor.Position)
' ,
Dim t As Type = GetType(NotifyIcon)
Dim mi As Reflection.MethodInfo = t.GetMethod("ShowContextMenu", Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Instance)
mi.Invoke(NotifyIcon1, Nothing)
Case Windows.Forms.MouseButtons.Right
Case Windows.Forms.MouseButtons.Middle
End Select
End Sub