Private Sub b0_Click()
ascensor.Top = pb.Top + 200
contadorpb.Caption = contadorpb.Caption + 1
End Sub
Private Sub b1_Click()
ascensor.Top = p1.Top + 200
contador1.Caption = contador1.Caption + 1
End Sub
Private Sub b2_Click()
ascensor.Top = p2.Top + 200
contador2.Caption = contador2.Caption + 1
End Sub
Private Sub b3_Click()
ascensor.Top = p3.Top + 200
contador3.Caption = contador3.Caption + 1
End Sub
Private Sub b4_Click()
ascensor.Top = p4.Top + 200
contador4.Caption = contador4.Caption + 1
End Sub
Private Sub b5_Click()
Texto1.Visible = True
enter.Visible = True
contraseña.Visible = True
End Sub
Private Sub boton1_Click()
ascensor2.Top = p1.Top + 200
contador1b.Caption = contador1b.Caption + 1
End Sub
Private Sub boton2_Click()
ascensor2.Top = p2.Top + 200
contador2b.Caption = contador2b.Caption + 1
End Sub
Private Sub boton3_Click()
ascensor2.Top = p3.Top + 200
contador3b.Caption = contador3b.Caption + 1
End Sub
Private Sub boton4_Click()
ascensor2.Top = p4.Top + 200
contador4b.Caption = contador4b.Caption + 1
End Sub
Private Sub boton5_Click()
Texto2.Visible = True
enter2.Visible = True
contraseña2.Visible = True
End Sub
Private Sub enter_Click()
If Texto1 = "1234" Then
ascensor.Top = p5.Top + 200
contador5.Caption = contador5.Caption + 1
Texto1 = ""
Texto1.Visible = False
contraseña.Visible = False
enter.Visible = False
End If
End Sub
Private Sub enter2_Click()
If Texto2 = "1234" Then
ascensor2.Top = p5.Top + 200
contador5b.Caption = contador5b.Caption + 1
Texto2 = ""
Texto2.Visible = False
contraseña2.Visible = False
enter2.Visible = False
End If
End Sub
Private Sub Label6_Click()
End Sub
Private Sub off_Click()
b1.Enabled = False
b2.Enabled = False
b3.Enabled = False
b4.Enabled = False
b5.Enabled = False
b0.Enabled = False
sub0.Enabled = False
ascensor.BackColor = vbBlack
contador1.BackColor = vbBlack
contador2.BackColor = vbBlack
contador3.BackColor = vbBlack
contador4.BackColor = vbBlack
contador5.BackColor = vbBlack
contadorpb.BackColor = vbBlack
contadorss.BackColor = vbBlack
piso5.Enabled = False
piso4.Enabled = False
piso3.Enabled = False
piso2.Enabled = False
piso1.Enabled = False
pb2.Enabled = False
ss2.Enabled = False
reset.Enabled = False
End Sub
Private Sub sub_Click()
ascensor.Top = ss.Top + 200
contadorss.Caption = contadorss.Caption + 1
End Sub
Private Sub off2_Click()
boton1.Enabled = False
boton2.Enabled = False
boton3.Enabled = False
boton4.Enabled = False
boton5.Enabled = False
pb3.Enabled = False
ss3.Enabled = False
ascensor2.BackColor = vbBlack
contador1b.BackColor = vbBlack
contador2b.BackColor = vbBlack
contador3b.BackColor = vbBlack
contador4b.BackColor = vbBlack
contador5b.BackColor = vbBlack
contadorpb2.BackColor = vbBlack
contadorss2.BackColor = vbBlack
piso5.Enabled = False
piso4.Enabled = False
piso3.Enabled = False
piso2.Enabled = False
piso1.Enabled = False
pb2.Enabled = False
ss2.Enabled = False
reset2.Enabled = False
End Sub
Private Sub on_Click()
b1.Enabled = True
b2.Enabled = True
b3.Enabled = True
b4.Enabled = True
b5.Enabled = True
b0.Enabled = True
sub0.Enabled = True
ascensor.BackColor = vbDesktop
contador1.BackColor = vbWhite
contador2.BackColor = vbWhite
contador3.BackColor = vbWhite
contador4.BackColor = vbWhite
contador5.BackColor = vbWhite
contadorpb.BackColor = vbWhite
contadorss.BackColor = vbWhite
piso5.Enabled = True
piso4.Enabled = True
piso3.Enabled = True
piso2.Enabled = True
piso1.Enabled = True
pb2.Enabled = True
ss2.Enabled = True
reset.Enabled = True
End Sub
Private Sub on2_Click()
boton1.Enabled = True
boton2.Enabled = True
boton3.Enabled = True
boton4.Enabled = True
boton5.Enabled = True
pb3.Enabled = True
ss3.Enabled = True
ascensor2.BackColor = vbDesktop
contador1b.BackColor = vbWhite
contador2b.BackColor = vbWhite
contador3b.BackColor = vbWhite
contador4b.BackColor = vbWhite
contador5b.BackColor = vbWhite
contadorpb2.BackColor = vbWhite
contadorss2.BackColor = vbWhite
piso5.Enabled = True
piso4.Enabled = True
piso3.Enabled = True
piso2.Enabled = True
piso1.Enabled = True
pb2.Enabled = True
ss2.Enabled = True
reset2.Enabled = True
End Sub
Private Sub pb2_Click()
If Sqr((pb.Top - ascensor.Top) ^ 2) > Sqr((pb.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = pb.Top + 200
Else: ascensor.Top = pb.Top + 200
End If
End Sub
Private Sub pb3_Click()
ascensor2.Top = pb.Top + 200
contadorpb2.Caption = contadorpb2.Caption + 1
End Sub
Private Sub piso1_Click()
If Sqr((p1.Top - ascensor.Top) ^ 2) > Sqr((p1.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p1.Top + 200
Else: ascensor.Top = p1.Top + 200
End If
End Sub
Private Sub piso2_Click()
If Sqr((p2.Top - ascensor.Top) ^ 2) > Sqr((p2.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p2.Top + 200
Else: ascensor.Top = p2.Top + 200
End If
End Sub
Private Sub piso3_Click()
If Sqr((p3.Top - ascensor.Top) ^ 2) > Sqr((p3.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p3.Top + 200
Else: ascensor.Top = p3.Top + 200
End If
End Sub
Private Sub piso4_Click()
If Sqr((p4.Top - ascensor.Top) ^ 2) > Sqr((p4.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p4.Top + 200
Else: ascensor.Top = p4.Top + 200
End If
End Sub
Private Sub piso5_Click()
If Sqr((p5.Top - ascensor.Top) ^ 2) > Sqr((p5.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p5.Top + 200
Else: ascensor.Top = p5.Top + 200
End If
End Sub
Private 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 Sub
Private 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 Sub
Private Sub ss2_Click()
If Sqr((ss.Top - ascensor.Top) ^ 2) > Sqr((ss.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = ss.Top + 200
Else: ascensor.Top = ss.Top + 200
End If
End Sub
Private Sub ss3_Click()
ascensor2.Top = ss.Top + 200
contadorss2.Caption = contadorss2.Caption + 1
End Sub
Private Sub sub0_Click()
ascensor.Top = ss.Top + 200
contadorss.Caption = contadorss.Caption + 1
End Sub
ascensor.Top = pb.Top + 200
contadorpb.Caption = contadorpb.Caption + 1
End Sub
Private Sub b1_Click()
ascensor.Top = p1.Top + 200
contador1.Caption = contador1.Caption + 1
End Sub
Private Sub b2_Click()
ascensor.Top = p2.Top + 200
contador2.Caption = contador2.Caption + 1
End Sub
Private Sub b3_Click()
ascensor.Top = p3.Top + 200
contador3.Caption = contador3.Caption + 1
End Sub
Private Sub b4_Click()
ascensor.Top = p4.Top + 200
contador4.Caption = contador4.Caption + 1
End Sub
Private Sub b5_Click()
Texto1.Visible = True
enter.Visible = True
contraseña.Visible = True
End Sub
Private Sub boton1_Click()
ascensor2.Top = p1.Top + 200
contador1b.Caption = contador1b.Caption + 1
End Sub
Private Sub boton2_Click()
ascensor2.Top = p2.Top + 200
contador2b.Caption = contador2b.Caption + 1
End Sub
Private Sub boton3_Click()
ascensor2.Top = p3.Top + 200
contador3b.Caption = contador3b.Caption + 1
End Sub
Private Sub boton4_Click()
ascensor2.Top = p4.Top + 200
contador4b.Caption = contador4b.Caption + 1
End Sub
Private Sub boton5_Click()
Texto2.Visible = True
enter2.Visible = True
contraseña2.Visible = True
End Sub
Private Sub enter_Click()
If Texto1 = "1234" Then
ascensor.Top = p5.Top + 200
contador5.Caption = contador5.Caption + 1
Texto1 = ""
Texto1.Visible = False
contraseña.Visible = False
enter.Visible = False
End If
End Sub
Private Sub enter2_Click()
If Texto2 = "1234" Then
ascensor2.Top = p5.Top + 200
contador5b.Caption = contador5b.Caption + 1
Texto2 = ""
Texto2.Visible = False
contraseña2.Visible = False
enter2.Visible = False
End If
End Sub
Private Sub Label6_Click()
End Sub
Private Sub off_Click()
b1.Enabled = False
b2.Enabled = False
b3.Enabled = False
b4.Enabled = False
b5.Enabled = False
b0.Enabled = False
sub0.Enabled = False
ascensor.BackColor = vbBlack
contador1.BackColor = vbBlack
contador2.BackColor = vbBlack
contador3.BackColor = vbBlack
contador4.BackColor = vbBlack
contador5.BackColor = vbBlack
contadorpb.BackColor = vbBlack
contadorss.BackColor = vbBlack
piso5.Enabled = False
piso4.Enabled = False
piso3.Enabled = False
piso2.Enabled = False
piso1.Enabled = False
pb2.Enabled = False
ss2.Enabled = False
reset.Enabled = False
End Sub
Private Sub sub_Click()
ascensor.Top = ss.Top + 200
contadorss.Caption = contadorss.Caption + 1
End Sub
Private Sub off2_Click()
boton1.Enabled = False
boton2.Enabled = False
boton3.Enabled = False
boton4.Enabled = False
boton5.Enabled = False
pb3.Enabled = False
ss3.Enabled = False
ascensor2.BackColor = vbBlack
contador1b.BackColor = vbBlack
contador2b.BackColor = vbBlack
contador3b.BackColor = vbBlack
contador4b.BackColor = vbBlack
contador5b.BackColor = vbBlack
contadorpb2.BackColor = vbBlack
contadorss2.BackColor = vbBlack
piso5.Enabled = False
piso4.Enabled = False
piso3.Enabled = False
piso2.Enabled = False
piso1.Enabled = False
pb2.Enabled = False
ss2.Enabled = False
reset2.Enabled = False
End Sub
Private Sub on_Click()
b1.Enabled = True
b2.Enabled = True
b3.Enabled = True
b4.Enabled = True
b5.Enabled = True
b0.Enabled = True
sub0.Enabled = True
ascensor.BackColor = vbDesktop
contador1.BackColor = vbWhite
contador2.BackColor = vbWhite
contador3.BackColor = vbWhite
contador4.BackColor = vbWhite
contador5.BackColor = vbWhite
contadorpb.BackColor = vbWhite
contadorss.BackColor = vbWhite
piso5.Enabled = True
piso4.Enabled = True
piso3.Enabled = True
piso2.Enabled = True
piso1.Enabled = True
pb2.Enabled = True
ss2.Enabled = True
reset.Enabled = True
End Sub
Private Sub on2_Click()
boton1.Enabled = True
boton2.Enabled = True
boton3.Enabled = True
boton4.Enabled = True
boton5.Enabled = True
pb3.Enabled = True
ss3.Enabled = True
ascensor2.BackColor = vbDesktop
contador1b.BackColor = vbWhite
contador2b.BackColor = vbWhite
contador3b.BackColor = vbWhite
contador4b.BackColor = vbWhite
contador5b.BackColor = vbWhite
contadorpb2.BackColor = vbWhite
contadorss2.BackColor = vbWhite
piso5.Enabled = True
piso4.Enabled = True
piso3.Enabled = True
piso2.Enabled = True
piso1.Enabled = True
pb2.Enabled = True
ss2.Enabled = True
reset2.Enabled = True
End Sub
Private Sub pb2_Click()
If Sqr((pb.Top - ascensor.Top) ^ 2) > Sqr((pb.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = pb.Top + 200
Else: ascensor.Top = pb.Top + 200
End If
End Sub
Private Sub pb3_Click()
ascensor2.Top = pb.Top + 200
contadorpb2.Caption = contadorpb2.Caption + 1
End Sub
Private Sub piso1_Click()
If Sqr((p1.Top - ascensor.Top) ^ 2) > Sqr((p1.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p1.Top + 200
Else: ascensor.Top = p1.Top + 200
End If
End Sub
Private Sub piso2_Click()
If Sqr((p2.Top - ascensor.Top) ^ 2) > Sqr((p2.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p2.Top + 200
Else: ascensor.Top = p2.Top + 200
End If
End Sub
Private Sub piso3_Click()
If Sqr((p3.Top - ascensor.Top) ^ 2) > Sqr((p3.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p3.Top + 200
Else: ascensor.Top = p3.Top + 200
End If
End Sub
Private Sub piso4_Click()
If Sqr((p4.Top - ascensor.Top) ^ 2) > Sqr((p4.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p4.Top + 200
Else: ascensor.Top = p4.Top + 200
End If
End Sub
Private Sub piso5_Click()
If Sqr((p5.Top - ascensor.Top) ^ 2) > Sqr((p5.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = p5.Top + 200
Else: ascensor.Top = p5.Top + 200
End If
End Sub
Private 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 Sub
Private 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 Sub
Private Sub ss2_Click()
If Sqr((ss.Top - ascensor.Top) ^ 2) > Sqr((ss.Top - ascensor2.Top) ^ 2) Then
ascensor2.Top = ss.Top + 200
Else: ascensor.Top = ss.Top + 200
End If
End Sub
Private Sub ss3_Click()
ascensor2.Top = ss.Top + 200
contadorss2.Caption = contadorss2.Caption + 1
End Sub
Private Sub sub0_Click()
ascensor.Top = ss.Top + 200
contadorss.Caption = contadorss.Caption + 1
End Sub
No comments:
Post a Comment