13.08.2013, 17:00
This is what I had lying around, you'll find various other methods on the internet.
Код:
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vkey As Int32) As UShort 'Timer interval: less than 50ms is good to catch most clicks. 'Run it on a seperate thread if you don't want to lag out form drawing. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If GetAsyncKeyState(&H1) And 1 Then MsgBox("X") End If End Sub