Mouse Event

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Is there a way to receive a message any time the mouse is clicked
anywhere on the screen? I would be kind of like a clicke event handler
for the entire screen.
 
Use SetWindowsHookEx:

<DllImport("user32.dll")> _
Public Shared Function SetWindowsHookEx( _
ByVal idHook As Integer, _
ByVal lpfn As HookProc, _
ByVal hInstance As IntPtr, _
ByVal threadId As Integer) As Integer
End Function

<DllImport("user32.dll")> _
Public Shared Function UnhookWindowsHookEx(ByVal idHook As Integer) As
Boolean
End Function

<DllImport("user32.dll")> _
Public Shared Function CallNextHookEx( _
ByVal idHook As Integer, _
ByVal nCode As Integer, _
ByVal wParam As Integer, _
ByVal lParam As IntPtr) As Integer
End Function
 
Unfortunately this is not what the OP is looking for. Please read his other
postings; subject 'Monitor'..
Dave, please don't start multiple threads about the same issue, I replied to
your latest posting titled 'Monitor'.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top