Processing Enter on Form Controls

T

Todd Brown

I've been having trouble correctly processing the "Enter" key on form
controls. Here's what I've done:

Set the "AcceptsReturn" property to true
Overridden IsInputKey and KeyDown; on KeyDown, if the "Enter" key was
pressed, I set e.Handled to true.

So now I'm receiving the event, which is good but.... When I press
"Enter" in that control (it's a text box, if that makes any difference)
I get the Windows "Default Beep." I don't want the default beep. Who
else is receiving this event, and why is it causing the default beep?
How do I stop this behavior?

On a related note: I remember writing Windows software back in the day,
and there were handy programs that would show me *all* of the events a
particular control received...event watchers. Does Visual Studio have
such a program and, if not, I assume there is something out there...if
anyone has any recommendations, I would welcome hearing them.
 
T

Todd Brown

GM3TEN said:
I suspect your textbox control's "Multiline" property is not set to
"true" and this is why you are hearing the beep.

-GM

http://nonspect.com
The textbox's "Multiline" property is set to "true"...still haven't
figured out the default beep issue.

-- T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top