Michel Jr
Apr 13th, 2000, 06:49 PM
Hello,
I'm developing an activex Command Button.
When the button has the focus and the user clicks
the mouse, the RaiseEvent Click fires correctly.
But when the button has the focus and the user press
ENTER, nothing happens.
My control has the following methods: Click, KeyDown,
KeyPress, KeyUp, EnterFocus, ExitFocus, GotFocus, etc...
How can I check if the user pressed ENTER to fire the
method correctly?
This is my KeyPress routine:
Private Sub UserControl_KeyPress(KeyAscii As Integer)
RaiseEvent KeyPress(KeyAscii)
If KeyAscii = 13 Then
'What should I put here?
End If
End Sub
I think I'm not using the KeyPress method correctly...
Thanks for any help...
Michel Jr.
I'm developing an activex Command Button.
When the button has the focus and the user clicks
the mouse, the RaiseEvent Click fires correctly.
But when the button has the focus and the user press
ENTER, nothing happens.
My control has the following methods: Click, KeyDown,
KeyPress, KeyUp, EnterFocus, ExitFocus, GotFocus, etc...
How can I check if the user pressed ENTER to fire the
method correctly?
This is my KeyPress routine:
Private Sub UserControl_KeyPress(KeyAscii As Integer)
RaiseEvent KeyPress(KeyAscii)
If KeyAscii = 13 Then
'What should I put here?
End If
End Sub
I think I'm not using the KeyPress method correctly...
Thanks for any help...
Michel Jr.