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 = TextBox1.Text
TextBox1.Text = a * 1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim a As Integer
a = TextBox1.Text
TextBox2.Text = a * 2
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim a As Integer
a = TextBox1.Text
TextBox3.Text = a * 3
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim a As Integer
a = TextBox1.Text
TextBox4.Text = a * 4
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim a As Integer
a = TextBox1.Text
TextBox5.Text = a * 5
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim a As Integer
a = TextBox1.Text
TextBox6.Text = a * 6
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim a As Integer
a = TextBox1.Text
TextBox1.Text = a * 1
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
Dim a As Integer
a = TextBox1.Text
TextBox2.Text = a * 2
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
Dim a As Integer
a = TextBox1.Text
TextBox3.Text = a * 3
End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
Dim a As Integer
a = TextBox1.Text
TextBox4.Text = a * 4
End Sub
Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged
Dim a As Integer
a = TextBox1.Text
TextBox5.Text = a * 5
End Sub
Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged
Dim a As Integer
a = TextBox1.Text
TextBox6.Text = a * 6
End Sub
End Class
lunes, 23 de junio de 2014
martes, 17 de junio de 2014
Examen de las tablas demultiplicar Andrea
|
Class
Form1
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Dim a,
b, x, y, c, d As Integer
Dim w As String
a = Val(InputBox("indique
en la tabla de multiplicar desea evaluarse", "tabla", 0))
If a <> 0 Then
For
x = 1 To 10
b = a * x
w = "deme el valor de la operacion de
" & a & " por"
& x
y = Val(InputBox(w, "examen",
0))
If y <> 0 Then
If
y = b Then
MsgBox("usted
a acertado", MsgBoxStyle.Information
+ MsgBoxStyle.OkOnly, "bien hecho")
c = c + 1
Else
MsgBox("usted se ha equivocado", MsgBoxStyle.OkOnly + MsgBoxStyle.OkOnly
+ MsgBoxStyle.Critical, "mejor para la proxima")
d
= d + 1
End
If
TextBox1.Text =
TextBox1.Text & a & "x"
& x & "=" & b &
vbCrLf
Else
MsgBox("usted cancelo el proceso", MsgBoxStyle.OkOnly + MsgBoxStyle.Information,
"cancelar")
End
End
If
Next
Label2.Text = "el numero total de
aciertos es " & c
Label3.Text = "el numero total de
fallas es " & d
Else
MsgBox("usted
cancelo el proceso", MsgBoxStyle.OkOnly
+ MsgBoxStyle.Information, "cancelar")
End
End If
End Sub
End Class
Suscribirse a:
Entradas (Atom)