*MENU*


fmain
PUBLIC SUB Reloj_Click()
Form1.Show
END
PUBLIC SUB Exit_Click()
ME.Close
END


*CRONOMETRO*

PUBLIC s AS Integer
PUBLIC m AS Integer
PUBLIC h AS Integer
PUBLIC SUB Timer1_Timer()
s = TextBox1.Text
m = TextBox2.Text
h = TextBox3.Text
IF s < s =" s" s =" 0" m =" m"> 59 THEN
h = h + 1
m = 0
END IF
ENDIF
TextBox1.Text = s
TextBox2.Text = m
TextBox3.Text = h
END
PUBLIC SUB Button1_Click()
IF Button1.Text = "Iniciar" OR Button1.Text = "Reiniciar" THEN
Timer1.Enabled = TRUE
Button1.Text = "Parar"
ELSE
Timer1.Enabled = FALSE
Button1.Text = "Reiniciar"
ENDIF
END


PUBLIC SUB Button2_Click()
FMain.Show
END


*JUEGO*
PUBLIC a AS Integer
PUBLIC b AS Integer
PUBLIC c AS Integer
PUBLIC SUB Button1_Click()
Timer1.Enabled = TRUE
END
PUBLIC SUB Timer1_Timer()
DIM a, b, c AS Integer
TextBox4.Clear
RANDOMIZE
a = (Rnd * 10) + 1
TextBox1.text = a
'Message("este el el numero" & TextBox1.Text)
b = (Rnd * 10) + 1
TextBox2.text = b
c = (Rnd * 10) + 1
TextBox3.text = c
END
PUBLIC SUB Button2_Click()
Timer1.Enabled = FALSE
a = TextBox1.Text
b = TextBox2.Text
c = TextBox3.Text
IF a = b AND b = c AND a = c THEN
TextBox4.text = "GANO"
ELSE
TextBox4.Text = "INTENTE OTRA VEZ"
ENDIF
TextBox1.Text = a
TextBox2.Text = b
TextBox3.Text = c
IF TextBox4.Text = "GANO" THEN
TextBox7.Text = TextBox5.Text * TextBox6.Text
Message("APUESTA GANADA")
ELSE
TextBox7.Text = 0
TextBox1.Clear
TextBox2.Clear
TextBox3.Clear
TextBox5.Clear
TextBox6.Clear
Message("Apuesta Perdida")
ENDIF
END
PUBLIC SUB Button3_Click()
FMain.Show
END