Home All Groups Group Topic Archive Search About

Detect Right mouse click and key press

Author
30 May 2006 3:29 PM
John Wright
I need to backdoor my program for IT.  I want to set a form so that if an IT
staffer has the left ctrl key press and right click on a picturebox a hidden
control will appear (a checkbox) to override the startup of the program.
How is this done?

John

Author
30 May 2006 4:47 PM
Herfried K. Wagner [MVP]
"John Wright" <riley_wri***@notmail.com> schrieb:
>I need to backdoor my program for IT.  I want to set a form so that if an
>IT staffer has the left ctrl key press and right click on a picturebox a
>hidden control will appear (a checkbox) to override the startup of the
>program. How is this done?

\\\
Private Sub PictureBox1_MouseUp( _
    ByVal sender As Object, _
    ByVal e As MouseEventArgs _
) Handles PictureBox1.MouseUp
    If _
        e.Button = MouseButtons.Right AndAlso _
        CBool(Control.ModifierKeys And Keys.LControlKey) _
    Then
        MsgBox("Hello World!")
    End If
End Sub
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>