Dim bien As Integer
Dim total As Integer
Private Sub calificar_Click()
total = total + 1
C = Val(Label11.Caption) + Val(Label2.Caption)
If Val(Text1.Text) = C Then
Image2.Picture = LoadPicture("e:\PROFE ACA ESTAN SUS COSAS\camila salazar\FELIZ.JPG")
Label3.Caption = "FELICITACIONES!!"
bien = bien + 1
Label5.Caption = bien
Else
Image2.Picture = LoadPicture("e:\PROFE ACA ESTAN SUS COSAS\camila salazar\TRISTE.JPG")
Label3.Caption = "TE EQUIVOCASTE. SIGUE PRACTICANDO!!"
End If
Label7.Caption = total
Image2.Visible = True
Label3.Visible = True
Command2.SetFocus
End Sub
Private Sub Continuar_Click()
Label11.Caption = " "
Label2.Caption = " "
Text1.Text = " "
Randomize
a = Int(1 + Rnd * 10)
b = Int(1 + Rnd * 10)
Label11.Caption = Str(a)
Label2.Caption = Str(b)
Text1.Text = " "
Text1.SetFocus
Image2.Visible = False
Label3.Visible = False
End Sub
Private Sub salir_Click()
End
End Sub
Private Sub Form_Load()
total = 0
bien = 0
Randomize
a = Int(1 + Rnd * 10)
b = Int(1 + Rnd * 10)
Label11.Caption = Str(a)
Label2.Caption = Str(b)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
C = Val(Label11.Caption) + Val(Label2.Caption)
If Text1.Text = C Then
Image2.Picture = LoadPicture("F:\camila salazar\FELIZ.JPG")
Label3.Caption = "FELICITACIONES!!"
Else
Image2.Picture = LoadPicture("F:\camila salazar\TRISTE.JPG")
Label3.Caption = "TE EQUIVOCASTE. SIGUE PRACTICANDO!!"
End If
Image2.Visible = True
Label3.Visible = True
Command2.SetFocus
End If
End Sub
No hay comentarios:
Publicar un comentario
No dejes de comentar!!!