【全局鼠标状态判断】VB.NET代码

'获取鼠标位置、鼠标坐标、座标:
Dim 鼠标X = MousePosition.X
Dim 鼠标Y = MousePosition.Y

'全局键盘判断(只能判断Ctrl、Alt、Shift)
Control.ModifierKeys

'全局判断鼠标按下事件
Control.MouseButtons = MouseButtons.Left
'按键已弹起
Control.MouseButtons = MouseButtons.None
'鼠标左右键同时按下
Control.MouseButtons = (MouseButtons.Left Or MouseButtons.Right)

你可能感兴趣的:(.net,visualstudio,c#)