The information in this article applies to:
SUMMARY
In a Microsoft Visual Basic for Windows text box, the ENTER key causes a
warning beep to sound only if the MultiLine property is set to False (the
default) and the Warning Beep option is selected in the Sound dialog box of
the Windows Control panel. MORE INFORMATIONSpecifically, use an IF statement to trap the ENTER key and the set KeyAscii to zero (0). Setting the value to zero before the event procedure ends prevents Windows from detecting that the ENTER key was pressed and prevents the warning beep. This behavior is by design and is due to the fact that a non-multiline text box is a Windows default class of edit box. ExampleThe following code will prevent the beep.
Additional query words: return 2.00 3.00
Keywords : kbcode PrgCtrlsStd |
Last Reviewed: September 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |