میشه این کد رو طوری تکمیل کرد که از ورود کارکتر جلوگیری کنه ؟ 
در حال حاضر اگه کارکتر غیر عددی بخواد وارد بشه با ارور خارج میشه . 
متشکرم.
			
		
 
	 
 راه اول :
    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If Char.IsNumber(e.KeyChar) = False Then
            e.Handled = True
        Else
            e.Handled = False
        End If
    End Sub
راه دوم :
    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        Dim intKey As Char = e.KeyChar
        If Not ((intKey >= "0" And intKey <= "9") Or intKey = Chr(System.Windows.Forms.Keys.Back) Or intKey = Chr(System.Windows.Forms.Keys.Delete)) Then
            e.Handled = True
        Else
            e.Handled = False
        End If
    End Sub