When I press the Enter key in a Textbox I get a beep sound. But when I
press
the Enter key in a combobox, I don't get the beep sound. Is there a way to
suppress the beep? How to do this?
I believe there is a windows issue with beeps and the enter key. Try
running without the min/restore/close feature in the window (ie set the
form's ControlBox=false). This may (no promises) stop the beep when you hit
the enter key, but you will have a window without a control box in the upper
right corner. Put the control box back (ControlBox=true), and the beep will
return. In theory, there is a way to have ControlBox=true and have a
beep-less enter key. You intercept WM_MENUCHAR, and return MNC_CLOSE from
the window procedure. I have never tested this, so once again, no promises.
I think the beep is a windows response to a failed menu access key or
something like that.
What I do is live with the beeps because I want a ControlBox true and I want
to keep things simple.