31-08-15, 02:57 PM
سلام
1:
2:
موفقين
1:
كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If IsNumeric(TextBox1.Text) Then
TextBox2.Text = Val(TextBox1.Text) * 12
Else
MsgBox("تاكد من الرقم")
End If
End Sub2:
كود :
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Not (Char.IsControl(e.KeyChar) Or Char.IsDigit(e.KeyChar)) Then e.Handled = True
End Subموفقين
متغيب
