combox beep when enter key pressed
I would call it a bug when the same thing doesn't occur
for the TextBox control and it doesn't occur for the
ComboBox if the 'DropDownStyle' is set to ANYTHING other
than 'DropDown'. My code traps the KeyPress event of the
control and I set the property E.Handled=True and the beep
still occurs.
However, thank you for the alternative options on this,
I'll give it a try. Also, thank you for responding.
-Lee
Quote:
>-----Original Message-----
>Hi Lee,
>I do not know if this should be called a bug or not. The
behavior you see
>here is due to the fact, that there is no default button
on the form to
>accept the Enter key. However, I will check into this
next week and will
>post it here. If you want to work around this issue,
there are many ways to
Quote:
>do it but the simple one is to add a button on the form.
Make its visible
>property to False and do not add any code in the click
event. Then goto
>Forms properties window and select this button in the
AcceptButton property
Quote:
>of the form. This work around will work for many
controls on the form
Quote:
>including textboxes.
>Hope this helps!
>Bharat Patel
>Microsoft, Visual Basic .NET
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>Please reply to newsgroups only. Thanks.
>.