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
原文链接:https://www.f2er.com/vb/259132.htmlPrivate 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
原文链接:https://www.f2er.com/vb/259132.html