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)