31-08-15, 02:08 PM
كود للارقام فقط
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Char.IsControl(e.KeyChar) = False Then
If Char.IsDigit(e.KeyChar) Then
Else
e.Handled = True
End If
End If
End Sub
كود
If TextBox1 .Text = "" Then
MsgBox("ينبغي ادخال رقم", MsgBoxStyle.Exclamation, "حقل اجبااري")
TextBox1 .Focus()
Exit Sub
Else
TextBox2.Text = TextBox1 .Text * 12
End If
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Char.IsControl(e.KeyChar) = False Then
If Char.IsDigit(e.KeyChar) Then
Else
e.Handled = True
End If
End If
End Sub
كود
If TextBox1 .Text = "" Then
MsgBox("ينبغي ادخال رقم", MsgBoxStyle.Exclamation, "حقل اجبااري")
TextBox1 .Focus()
Exit Sub
Else
TextBox2.Text = TextBox1 .Text * 12
End If
