Private Sub txtup_KeyPress(ByVal…) Handles txtup.KeyPress
If Asc(e.KeyChar) >= 48 And Asc(e.KeyChar) <= 57 Then Exit Sub '數字鍵
If Asc(e.KeyChar) = 46 Then Exit Sub '小數點
If Asc(e.KeyChar) = 8 Then Exit Sub '倒退鍵
e.Handled = True '其他按鍵不接受
End Sub
全站熱搜
留言列表