SA-MP Forums Archive
[VB] Events out Form ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: [VB] Events out Form ? (/showthread.php?tid=457833)



[VB] Events out Form ? - ServerScripter - 13.08.2013

Hello , I'm making a mouse click calculator using Visual Basic Express 2010 , so I went to 'Click' event everything fine , but the problem when run , it counts the number of clicks only when I click on the Form , not outside , so how to make it working in the full screen , (where ever we click it counts)

Thanks
EDIT:

Everything we add to the Form has its evenements like

Private Sub Button_Evenement(.......) handless ...

How to make the evenement global , works when we click everywhere not only the thing we add ....


Re: [VB] Events out Form ? - God'Z War - 13.08.2013

search in ******

99% you will get the answer


Re: [VB] Events out Form ? - DoubleOG - 13.08.2013

Quote:
Originally Posted by God'Z War
Посмотреть сообщение
search in ******

99% you will get the answer
If he posts a thread like this, he probably didn't find the right answer on ******...


Re: [VB] Events out Form ? - sleepysnowflake - 13.08.2013

Quote:
Originally Posted by DoubleOG
Посмотреть сообщение
If he posts a thread like this, he probably didn't find the right answer on ******...
shit tyrone, he didn't even try


Re: [VB] Events out Form ? - ServerScripter - 13.08.2013

No I've found nothing , only some subjects talking about "hooking" but didn't fix my problem....


Re: [VB] Events out Form ? - iPLEOMAX - 13.08.2013

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