HOW TO KNOW EVENT CANCEL OR RIGHTCLICK

HOW TO KNOW EVENT CANCEL OR RIGHTCLICK

Anonymous
Not applicable
229 Views
1 Reply
Message 1 of 2

HOW TO KNOW EVENT CANCEL OR RIGHTCLICK

Anonymous
Not applicable
I want to do a work. And it needs to know when ESC key press or RightMouseClick event. How can I get these action. Please help me. Thank in advance
0 Likes
230 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
for the esc key use winapi

Public Const VK_ESCAPE = &H1B
Declare Function GetAsyncKeyState Lib "user32" _
(ByVal vKey As Long) As Integer


Public Function UserEscaped() As Boolean
If GetAsyncKeyState(VK_ESCAPE) Then UserEscaped = True
End Function

for the mouse event use event for given control
for example, if you have a label named Label1

Private Sub Label1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
If Button = 1 Then
MsgBox "Left button"
End If
If Button = 2 Then
MsgBox "Right button"
End If


End Sub

hth
--
Mark

wrote in message news:4934753@discussion.autodesk.com...
I want to do a work. And it needs to know when ESC key press or
RightMouseClick event. How can I get these action. Please help me. Thank in
advance
0 Likes