Avoid "" sound from the [ENTER] button

zhaozj2021-02-11  264

Avoid "" sound from the [ENTER] button

When you enter the information in the text box (Text Box) and press the [ENTER] button, you will hear the computer speaker to make a "" sound. You can avoid this sound in the following ways: Suppose the text box is Text1, enter the following code in the KeyPress event:

Private sub text1_keypress (keyascii as integer) 'VB Man 2001'URL: http://goodvbman.yeah.net' e-mail: cool@21cn.comif keyascii = ASC (vbcr) ThenKeyascii = 0 'The program content you want to execute . End ifend sub

When you run the program, press the [ENTER] button will never hear the hard-listening sound.

转载请注明原文地址:https://www.9cbs.com/read-4876.html

New Post(0)