|
-
May 21st, 1999, 12:50 PM
#1
Catching vbReturn results in a BEEP sound, why??
Hi there,
this one will hunt me for the rest of my life I fear! Already in my MFC applications I encountered the problem that when I try to catch the "Return" (enter) keycode in the keydown event, the system still
plays a beeping sound to indicated something is wrong (aka wrong key is pressed).
Here what I am doing:
private Sub CtrlEdit_KeyDown(KeyCode as Integer, Shift as Integer)
Dim ShiftDown as Boolean
Dim AltDown as Boolean
Dim CtrlDown as Boolean
Dim AnyDown as Boolean
ShiftDown = (Shift And vbShiftMask) > 0
AltDown = (Shift And vbAltMask) > 0
CtrlDown = (Shift And vbCtrlMask) > 0
AnyDown = ShiftDown Or AltDown Or CtrlDown
If AnyDown then
Exit Sub
End If
Select Case KeyCode
Case vbKeyReturn', vbKeyExecute
' some stuff here
'KeyCode = 0 ' already tried this to mark this key-event as done
end select
Any hints how to get rid of this annoying sound?
(btw: same happens for tab and escape character)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|