Private Sub TxtCount_KeyDown(ByVal sender As Object,ByVal e As System.Windows.Forms.KeyEventArgs) Handles Txtcount.KeyDown If (e.KeyValue = 13) Then dgv1add()'这是目标函数 End IfEnd Sub
记得用keydown 不要用keypress
Private Sub TxtCount_KeyDown(ByVal sender As Object,ByVal e As System.Windows.Forms.KeyEventArgs) Handles Txtcount.KeyDown If (e.KeyValue = 13) Then dgv1add()'这是目标函数 End IfEnd Sub
记得用keydown 不要用keypress