# Re: 有关Text Box的KeyDown事件,刚刚try了一下,不行....????

Posted by Dai on November 29, 1999 at 09:52:15:

In Reply to: Re: 有关Text Box的KeyDown事件,刚刚try了一下,不行....???? posted by Allen on November 28, 1999 at 22:16:19:

: : 在KeyDown时假如按下KeyCode=13
: : 就把KeyCode =0
: : 就不会有声音了
: : 如果有要执行任何程式码记得先加上

: Code如下:
: Private Sub Text1_KeyDown(.....)
: If KeyCode=13 Then
: KeyCode=0
: Text2.SetFocus
: End If

Sorry!记错了
应该将程式码Key在KeyPress中才对
Private Sub Text1_KeypPress(.....)
If KeyAscii=13 Then
KeyAscii=0
Text2.SetFocus
End If

Follow Ups: