Home All Groups Group Topic Archive Search About

.NET UpDown KeyPress Beep

Author
29 Jun 2006 2:06 PM
Mike
Greetings,

We are handling the KeyPress event in an UpDown control, which
determines if Enter or Escape has been pressed, then closes the dialog
with either a DialogResult.OK or DialogResult.Cancel, respectively. We
seem to be having a beep occur when this happens, at some point after
the event handler is through processing. Not sure quite why this is.
Any ideas to inspire us in the right direction? Thanks in advance.

Regards,
Michael Powell

Author
29 Jun 2006 2:28 PM
Mike
Apologies for my ignorance. Just FYI, apparently this is a difference
between how the framework handles KeyPress and KeyDown. KeyDown seems
to be the preferred method (occuring without that annoying beep...).
Not to mention, the KeyDown event arguments are more informative
anyway. Hope this helps.


Mike wrote:
Show quote
> Greetings,
>
> We are handling the KeyPress event in an UpDown control, which
> determines if Enter or Escape has been pressed, then closes the dialog
> with either a DialogResult.OK or DialogResult.Cancel, respectively. We
> seem to be having a beep occur when this happens, at some point after
> the event handler is through processing. Not sure quite why this is.
> Any ideas to inspire us in the right direction? Thanks in advance.
>
> Regards,
> Michael Powell

AddThis Social Bookmark Button