sorry for not being clear, i meant put a mouse hook on the formload event.
then you can receive every mouse click....ex:
Private Const HC_ACTION As Integer = 0
Private Const WH_MOUSE_LL As Integer = 14
Private Const WM_LBUTTONDOWN As Integer = &H201
Private Const WM_MOUSEWHEEL As Integer = &H20A
Private Declare Function SetWindowsHookEx Lib "user32" _
Alias "SetWindowsHookExA" ( _
ByVal idHook As Integer, _
ByVal lpfn As LowLevelMouseProcDelegate, _
ByVal hmod As Integer, _
ByVal dwThreadId As Integer) As Integer
Private Declare Function CallNextHookEx Lib "user32" ( _
ByVal hHook As Integer, _
ByVal nCode As Integer, _
ByVal wParam As Integer, _
ByVal lParam As MSLLHOOKSTRUCT) As Integer
Private Declare Function UnhookWindowsHookEx Lib "user32" ( _
ByVal hHook As Integer) As Integer
Private Function LowLevelMouseProc( _
ByVal nCode As Integer, _
ByVal wParam As Integer, _
ByVal lParam As MSLLHOOKSTRUCT) As Integer
If (nCode = HC_ACTION) Then
If wParam = WM_LBUTTONDOWN Then
''do something on left mouse click
End If
Return CallNextHookEx(hhkLowLevelMouse, _
nCode, wParam, lParam)
End If
End Function
Private Delegate Function LowLevelMouseProcDelegate( _
ByVal nCode As Integer, _
ByVal wParam As Integer, _
ByVal lParam As MSLLHOOKSTRUCT) As Integer
''set mouse hook
Public Sub DisableMouse()
'Set Mouse Hook
hhkLowLevelMouse = SetWindowsHookEx(WH_MOUSE_LL, _
AddressOf LowLevelMouseProc, _
Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0)).ToInt32, _
0)
End Sub
''release hook
Public Sub EnableMouse()
'Release Mouse Hook
UnhookWindowsHookEx(hhkLowLevelMouse)
End Sub
hope this helps