Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Declare Sub mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32)
- Private Sub frmWinSamAppMain_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
- Select Case e.KeyCode
- Case Keys.F1
- Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)
- mouse_event(&H2, 0, 0, 0, 1) 'Cursor will go down (like a click)
- mouse_event(&H4, 0, 0, 0, 1) 'Cursor goes up again End Sub
- End Select
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment