Hi
Is it possible to capture a mouse click anywhere on a form (both on the form itself and on any control) without putting code in each control?
I want to reset a timer/timeout when the user hits a key (which I have working no problem w/ a combo of
1. Keypreview turned on
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Me.KeyPreview = True
End Sub
2. Capturing KeyDown event
Private Sub Login_Key(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
MsgBox("key")
End Sub
I can capture the mouse click on the form by using the mousedown event, but then I would also have to put code inside each control on the form to capture the mouse clicks there.
Private Sub SMKiosk_Login_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick
MsgBox("mouse click")
End Sub
Any ideas on how to do this?
Thanks,
Scott