本帖最后由 zgblxy 于 2019-6-20 09:52 编辑
我的代码是这样的,感觉没有错,请大神指教!
Private Sub txtShoBunruiCD_KeyDown(sender As Object, e As KeyEventArgs) Handles txtShoBunruiCD.KeyDown
If e.KeyCode = Keys.Enter Then
txtShoBunruiCD.Text = vbNullString
MessageBox.Show("1")
ElseIf txtShoBunruiCD.TextLength <> 3 Then
MessageBox.Show("2")
End If
End Sub
|
|