Attempting to Simulate Mouse Click / Drag

后端 未结 3 1200
既然无缘
既然无缘 2021-01-12 16:33

So I\'m trying to simulate the left mouse click and the left mouse release to do some automated dragging and dropping.

It\'s currently in a C# Winforms (Yes, winform

3条回答
  •  广开言路
    2021-01-12 17:12

    The following code should return true if the left mouse button is down, false if it is up, Control being System.Windows.Forms.Control:

        Control.MouseButtons.HasFlag(MouseButtons.Left)
    

    p.s. documentation for this can be found on MSDN here.

提交回复
热议问题