[VB] Events out Form ?
#1

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 ....
Reply
#2

search in ******

99% you will get the answer
Reply
#3

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 ******...
Reply
#4

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
Reply
#5

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)