控件输入判断问题,VB.NET的请帮助!
Private Sub rkd_cp_num_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles rkd_cp_num.KeyDown
If e.KeyValue = 110 Or e.KeyValue = 190 Then
If Len(Me.rkd_cp_num.Text) = 0 Then
Me.rkd_cp_num.Text = "0."
Exit Sub
End If
End If
If e.KeyValue > 95 And e.KeyValue < 106 Then
Exit Sub
End If
If e.KeyValue > 47 And e.KeyValue < 58 Then
Exit Sub
End If
rkd_cp_num.Text = ""
rkd_cp_num.Focus()
End Sub
在第一个字符输入小数点时 输出 .0. 是什么问题 谢谢大家!