Public Class Form1
    Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
 Dim a As Integer
a = Val(TextBox1.Text) Mod 2If TextBox1.Text <> "" Then
  If
a <> 0 Then
 Label1.Text = "Es
numero impar"
  Else
  Label1.Text = "Es numero par"
   End If
    Else
 MsgBox("No a introducido datos,favor de
intentar de nuevo", vbYes + vbCritical, "error")
 End If
 End Sub
 Private Sub textbox1_textchanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox1.TextChanged
 Button1.Enabled = True
 End Sub
End
Class


 
No hay comentarios.:
Publicar un comentario