0
Hello. I wonder if in VB.NET (Windows Forms) has how to make an event happen only during the time when the mouse button (LMB) is pressed.
For example, while the user holds the mouse button, the "W" key will be sent several times. And as soon as he releases the mouse button, the "W" key will stop sending.
And also, if you can make it work in the background, in this case, not only within the program, but throughout the computer, using the press function for example, only that this would be more of a "hold" function, an example of code:
If Held.Keys.LMB = True
SendKeys.Send("W")
End If
Thank you in advance.
Where do you want this code to be executed? In form? Has the events Mousedown and Mouseup for that purpose.
– João Martins