viernes, 14 de noviembre de 2008

visual

Private Sub boton1_Click()auxiliar.Caption = Sqr(((ascensor.Top - 3600) / 840) ^ 2)cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)veces1.Caption = veces1.Caption + 1acensor.Top = "3600"End Sub
Private Sub boton2_Click()auxiliar.Caption = Sqr(((ascensor.Top - 2760) / 840) ^ 2)cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)veces2.Caption = veces2.Caption + 1acensor.Top = "2760"End Sub
Private Sub boton3_Click()auxiliar.Caption = Sqr(((ascensor.Top - 1920) / 840) ^ 2)cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)veces3.Caption = veces3.Caption + 1acensor.Top = "1920"End Sub
Private Sub boton4_Click()auxiliar.Caption = Sqr(((ascensor.Top - 1080) / 840) ^ 2)cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)veces4.Caption = veces4.Caption + 1acensor.Top = "1080"End Sub
Private Sub boton5_Click()auxiliar.Caption = Sqr(((ascensor.Top - 240) / 840) ^ 2)cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)veces5.Caption = veces5.Caption + 1acensor.Top = "240"End Sub
Private Sub botonpb_Click()auxiliar.Caption = Sqr(((ascensor.Top - 4440) / 840) ^ 2)cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)vecespb.Caption = vecespb.Caption + 1acensor.Top = "4440"End Sub
Private Sub botonss_Click()auxiliar.Caption = Sqr(((ascensor.Top - 5280) / 840) ^ 2)cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)vecesss.Caption = vecesss.Caption + 1acensor.Top = "5280"End Sub
Private Sub cinco_Click()veces5.Caption = veces5.Caption + 1If contraseña.Text = "blondy" Thencontraseña.Text = ""acensor.Top = "240"n7.Caption = "5"n6.Caption = "5"n5(0).Caption = "5"n4(0).Caption = "5"n3.Caption = "5"n2(1).Caption = "5"n1(1).Caption = "5"
End IfEnd Sub
Private Sub cuatro_Click()veces4.Caption = veces4.Caption + 1acensor.Top = "1080"
n7.Caption = "4"n6.Caption = "4"n5(0).Caption = "4"n4(0).Caption = "4"n3.Caption = "4"n2(1).Caption = "4"n1(1).Caption = "4"
End Sub
Private Sub dos_Click()veces2.Caption = veces2.Caption + 1acensor.Top = "2760"
n7.Caption = "2"n6.Caption = "2"n5(0).Caption = "2"n4(0).Caption = "2"n3.Caption = "2"n2(1).Caption = "2"n1(1).Caption = "2"
End Sub
Private Sub LUCES_Click()If acensor.FillColor = vbRed Then acensor.FillColor = vbYellow ElseIf acensor.FillColor = vbYellow Thenacensor.FillColor = vbRedEnd IfEnd IfEnd Sub
Private Sub parar_Click()If LUCES.Enabled = True ThenLUCES.Enabled = FalseElseLUCES.Enabled = TrueEnd IfIf uno.Enabled = True Thenuno.Enabled = FalseElseuno.Enabled = TrueEnd IfIf dos.Enabled = True Thendos.Enabled = FalseElsedos.Enabled = TrueEnd IfIf tres.Enabled = True Thentres.Enabled = FalseElsetres.Enabled = TrueEnd IfIf cuatro.Enabled = True Thencuatro.Enabled = FalseElsecuatro.Enabled = TrueEnd IfIf cinco.Enabled = True Thencinco.Enabled = FalseElsecinco.Enabled = TrueEnd IfIf PB.Enabled = True ThenPB.Enabled = FalseElsePB.Enabled = TrueEnd IfIf SS.Enabled = True ThenSS.Enabled = FalseElseSS.Enabled = TrueEnd IfIf boton1.Enabled = True Thenboton1.Enabled = FalseElseboton1.Enabled = TrueEnd IfIf boton2.Enabled = True Thenboton2.Enabled = FalseElseboton2.Enabled = TrueEnd IfIf boton3.Enabled = True Thenboton3.Enabled = FalseElseboton3.Enabled = TrueEnd IfIf boton4.Enabled = True Thenboton4.Enabled = FalseElseboton4.Enabled = TrueEnd IfIf boton5.Enabled = True Thenboton5.Enabled = FalseElseboton5.Enabled = TrueEnd IfIf botonpb.Enabled = True Thenbotonpb.Enabled = FalseElsebotonpb.Enabled = TrueEnd IfIf botonss.Enabled = True Thenbotonss.Enabled = FalseElsebotonss.Enabled = TrueEnd IfIf contraseña.Enabled = True Thencontraseña.Enabled = FalseElsecontraseña.Enabled = TrueEnd IfEnd Sub
Private Sub PB_Click()vecespb.Caption = vecespb.Caption + 1acensor.Top = "4440"n7.Caption = "pb"n6.Caption = "pb"n5(0).Caption = "pb"n4(0).Caption = "pb"n3.Caption = "pb"n2(1).Caption = "pb"n1(1).Caption = "pb"
End Sub
Private Sub SS_Click()vecesss.Caption = vecesss.Caption + 1acensor.Top = "5280"n7.Caption = "ss"n6.Caption = "ss"n5(0).Caption = "ss"n4(0).Caption = "ss"n3.Caption = "ss"n2(1).Caption = "ss"n1(1).Caption = "ss"
End Sub
Private Sub tres_Click()veces3.Caption = veces3.Caption + 1acensor.Top = "1920"n7.Caption = "3"n6.Caption = "3"n5(0).Caption = "3"n4(0).Caption = "3"n3.Caption = "3"n2(1).Caption = "3"n1(1).Caption = "3"
End Sub
Private Sub uno_Click()veces1.Caption = veces1.Caption + 1acensor.Top = "3600"n7.Caption = "1"n6.Caption = "1"n5(0).Caption = "1"n4(0).Caption = "1"n3.Caption = "1"n2(1).Caption = "1"n1(1).Caption = "1"
End Sub

No hay comentarios: