Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture Mouse Click

Status
Not open for further replies.

sna1maa14

Programmer
Nov 21, 2003
23
US
I have found code that will capture a mouse click in the form I use but what if I want to be able to capture any mouse click outside of the form like in another app or on the desktop? This way I can set the focus back to the form. Basicly i want to force them to click OK before going on to anything else. Here is a sample of what i have.

Private Sub Lt_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
If e.Button = MouseButtons.Left Then
MessageBox.Show("left button clicked")
End If
End Sub

Thanks
Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top