|How to disable textbox beep when pressing enter|
|By: Lorenzo Dalla Vecchia Date: 01/05/1998|
In a single-line text box, when you press the enter key
you hear a beep. This happens because you are not allowed to insert a carriage-return in
This can be solved easly: in fact the beep is generated when the routine for the KeyPress event ends. So you can handle the enter key (ASCII code 13) and execute operations. Then, before the end of the routine, you can make Visual Basic believe no key was pressed. This can be done by inserting this line before the
|Visual Basic Programming Zone is a website by
Lorenzo Dalla Vecchia.
To contact the Webmaster, click here.
Hosted by InWind: www.inwind.it