Private Sub b0_Click()ascensor.Top = pb.Top + 200contadorpb.Caption = contadorpb.Caption + 1End SubPrivate Sub b1_Click()ascensor.Top = p1.Top + 200contador1.Caption = contador1.Caption + 1End SubPrivate Sub b2_Click()ascensor.Top = p2.Top + 200contador2.Caption = contador2.Caption + 1End SubPrivate Sub b3_Click()ascensor.Top = p3.Top + 200contador3.Caption = contador3.Caption + 1End SubPrivate Sub b4_Click()ascensor.Top = p4.Top + 200contador4.Caption = contador4.Caption + 1End SubPrivate Sub b5_Click()Texto1.Visible = Trueenter.Visible = Truecontraseña.Visible = TrueEnd SubPrivate Sub boton1_Click()ascensor2.Top = p1.Top + 200contador1b.Caption = contador1b.Caption + 1End SubPrivate Sub boton2_Click()ascensor2.Top = p2.Top + 200contador2b.Caption = contador2b.Caption + 1End SubPrivate Sub boton3_Click()ascensor2.Top = p3.Top + 200contador3b.Caption = contador3b.Caption + 1End SubPrivate Sub boton4_Click()ascensor2.Top = p4.Top + 200contador4b.Caption = contador4b.Caption + 1End SubPrivate Sub boton5_Click()Texto2.Visible = Trueenter2.Visible = Truecontraseña2.Visible = TrueEnd SubPrivate Sub enter_Click()If Texto1 = "1234" Thenascensor.Top = p5.Top + 200contador5.Caption = contador5.Caption + 1Texto1 = ""Texto1.Visible = Falsecontraseña.Visible = Falseenter.Visible = FalseEnd IfEnd SubPrivate Sub enter2_Click()If Texto2 = "1234" Thenascensor2.Top = p5.Top + 200contador5b.Caption = contador5b.Caption + 1Texto2 = ""Texto2.Visible = Falsecontraseña2.Visible = Falseenter2.Visible = FalseEnd IfEnd SubPrivate Sub Label6_Click()End SubPrivate Sub off_Click()b1.Enabled = Falseb2.Enabled = Falseb3.Enabled = Falseb4.Enabled = Falseb5.Enabled = Falseb0.Enabled = Falsesub0.Enabled = Falseascensor.BackColor = vbBlackcontador1.BackColor = vbBlackcontador2.BackColor = vbBlackcontador3.BackColor = vbBlackcontador4.BackColor = vbBlackcontador5.BackColor = vbBlackcontadorpb.BackColor = vbBlackcontadorss.BackColor = vbBlackpiso5.Enabled = Falsepiso4.Enabled = Falsepiso3.Enabled = Falsepiso2.Enabled = Falsepiso1.Enabled = Falsepb2.Enabled = Falsess2.Enabled = Falsereset.Enabled = FalseEnd SubPrivate Sub sub_Click()ascensor.Top = ss.Top + 200contadorss.Caption = contadorss.Caption + 1End SubPrivate Sub off2_Click()boton1.Enabled = Falseboton2.Enabled = Falseboton3.Enabled = Falseboton4.Enabled = Falseboton5.Enabled = Falsepb3.Enabled = Falsess3.Enabled = Falseascensor2.BackColor = vbBlackcontador1b.BackColor = vbBlackcontador2b.BackColor = vbBlackcontador3b.BackColor = vbBlackcontador4b.BackColor = vbBlackcontador5b.BackColor = vbBlackcontadorpb2.BackColor = vbBlackcontadorss2.BackColor = vbBlackpiso5.Enabled = Falsepiso4.Enabled = Falsepiso3.Enabled = Falsepiso2.Enabled = Falsepiso1.Enabled = Falsepb2.Enabled = Falsess2.Enabled = Falsereset2.Enabled = FalseEnd SubPrivate Sub on_Click()b1.Enabled = Trueb2.Enabled = Trueb3.Enabled = Trueb4.Enabled = Trueb5.Enabled = Trueb0.Enabled = Truesub0.Enabled = Trueascensor.BackColor = vbDesktopcontador1.BackColor = vbWhitecontador2.BackColor = vbWhitecontador3.BackColor = vbWhitecontador4.BackColor = vbWhitecontador5.BackColor = vbWhitecontadorpb.BackColor = vbWhitecontadorss.BackColor = vbWhitepiso5.Enabled = Truepiso4.Enabled = Truepiso3.Enabled = Truepiso2.Enabled = Truepiso1.Enabled = Truepb2.Enabled = Truess2.Enabled = Truereset.Enabled = TrueEnd SubPrivate Sub on2_Click()boton1.Enabled = Trueboton2.Enabled = Trueboton3.Enabled = Trueboton4.Enabled = Trueboton5.Enabled = Truepb3.Enabled = Truess3.Enabled = Trueascensor2.BackColor = vbDesktopcontador1b.BackColor = vbWhitecontador2b.BackColor = vbWhitecontador3b.BackColor = vbWhitecontador4b.BackColor = vbWhitecontador5b.BackColor = vbWhitecontadorpb2.BackColor = vbWhitecontadorss2.BackColor = vbWhitepiso5.Enabled = Truepiso4.Enabled = Truepiso3.Enabled = Truepiso2.Enabled = Truepiso1.Enabled = Truepb2.Enabled = Truess2.Enabled = Truereset2.Enabled = TrueEnd SubPrivate Sub pb2_Click()If Sqr((pb.Top - ascensor.Top) ^ 2) > Sqr((pb.Top - ascensor2.Top) ^ 2) Thenascensor2.Top = pb.Top + 200Else: ascensor.Top = pb.Top + 200End IfEnd SubPrivate Sub pb3_Click()ascensor2.Top = pb.Top + 200contadorpb2.Caption = contadorpb2.Caption + 1End SubPrivate Sub piso1_Click()If Sqr((p1.Top - ascensor.Top) ^ 2) > Sqr((p1.Top - ascensor2.Top) ^ 2) Thenascensor2.Top = p1.Top + 200Else: ascensor.Top = p1.Top + 200End IfEnd SubPrivate Sub piso2_Click()If Sqr((p2.Top - ascensor.Top) ^ 2) > Sqr((p2.Top - ascensor2.Top) ^ 2) Thenascensor2.Top = p2.Top + 200Else: ascensor.Top = p2.Top + 200End IfEnd SubPrivate Sub piso3_Click()If Sqr((p3.Top - ascensor.Top) ^ 2) > Sqr((p3.Top - ascensor2.Top) ^ 2) Thenascensor2.Top = p3.Top + 200Else: ascensor.Top = p3.Top + 200End IfEnd SubPrivate Sub piso4_Click()If Sqr((p4.Top - ascensor.Top) ^ 2) > Sqr((p4.Top - ascensor2.Top) ^ 2) Thenascensor2.Top = p4.Top + 200Else: ascensor.Top = p4.Top + 200End IfEnd SubPrivate Sub piso5_Click()If Sqr((p5.Top - ascensor.Top) ^ 2) > Sqr((p5.Top - ascensor2.Top) ^ 2) Thenascensor2.Top = p5.Top + 200Else: ascensor.Top = p5.Top + 200End IfEnd SubPrivate Sub reset_Click()contadorss.Caption = "0"contadorpb.Caption = "0"contador1.Caption = "0"contador2.Caption = "0"contador3.Caption = "0"contador4.Caption = "0"contador5.Caption = "0"End SubPrivate Sub reset2_Click()contadorss2.Caption = "0"contadorpb2.Caption = "0"contador1b.Caption = "0"contador2b.Caption = "0"contador3b.Caption = "0"contador4b.Caption = "0"contador5b.Caption = "0"End SubPrivate Sub ss2_Click()If Sqr((ss.Top - ascensor.Top) ^ 2) > Sqr((ss.Top - ascensor2.Top) ^ 2) Thenascensor2.Top = ss.Top + 200Else: ascensor.Top = ss.Top + 200End IfEnd SubPrivate Sub ss3_Click()ascensor2.Top = ss.Top + 200contadorss2.Caption = contadorss2.Caption + 1End SubPrivate Sub sub0_Click()ascensor.Top = ss.Top + 200contadorss.Caption = contadorss.Caption + 1End Sub
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario