Realizar un video de entre 30 segundos y 1 minuto. Pueden aparecer los autores. Las imágenes deben ser tomadas de YouTube.

Debe relatar:

- Lo mas divertido (escolar) del año
- Lo mas aburrido (escolar) del año
- Lo mas dificil de TIC y en general (un tema, una clase, un proyecto)
- Lo mas interesante de TIC y en general (un tema, una clase, un proyecto)

No hacer nombres, solo mencionar materias. Publicarlo en YouTube y en el Campus (despues vemos como)
Showing posts with label Ascensor final. Show all posts
Showing posts with label Ascensor final. Show all posts

Wednesday, November 26, 2008

ascensor final (por ARI)




Private Sub borrar_Click()
contraseña = "contraseña."
subsdos.Enabled = True
controlsubsuelodos.Enabled = True
End Sub





Private Sub controldos_Click()
ascensor.Top = 3000
If ascensor.Top = 3000 Then

ptres.Caption = "2"
pdos.Caption = "2"
puno.Caption = "2"
ppb.Caption = "2"
pss.Caption = "2"
psubsuelodos.Caption = "2"
pisos.Caption = "2"
End If
If ascensor.Top = 3000 Then
cdos.Caption = cdos.Caption + 1
End If
If ascensor.Top = 3000 Then
total.Caption = total.Caption + 1
End If
tres.Enabled = True
dos.Enabled = False
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True
End Sub

Private Sub controlpb_Click()
ascensor.Top = 4200
If ascensor.Top = 4200 Then

ptres.Caption = "PB"
pdos.Caption = "PB"
puno.Caption = "PB"
ppb.Caption = "PB"
pss.Caption = "PB"
psubsuelodos.Caption = "PB"
pisos.Caption = "PB"
End If
If ascensor.Top = 4200 Then
cpb.Caption = cpb.Caption + 1
End If
If ascensor.Top = 4200 Then
total.Caption = total.Caption + 1
End If

tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = False
ss.Enabled = True
subsdos.Enabled = True
End Sub

Private Sub controlss_Click()
ascensor.Top = 4800
If ascensor.Top = 4800 Then


ptres.Caption = "SS"
pdos.Caption = "SS"
puno.Caption = "SS"
ppb.Caption = "SS"
pss.Caption = "SS"
psubsuelodos.Caption = "ss"
pisos.Caption = "SS"
End If
If ascensor.Top = 4800 Then
css.Caption = css.Caption + 1
End If
If ascensor.Top = 4800 Then
total.Caption = total.Caption + 1
End If

tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = False
subsdos.Enabled = True
End Sub

Private Sub controlsubsuelodos_Click()
If contraseña = "pepitos" Then
ascensor.Top = 1200
ptres.Caption = "subsdos"
pdos.Caption = "subsdos"
puno.Caption = "subsdos"
ppb.Caption = "subsdos"
pss.Caption = "subsdos"
psubsuelodos.Caption = "subsdos"
pisos.Caption = "subsdos"
contraseña = "ACCESO PERMITIDO"
Else
contraseña = "ACCESO DENEGADO"
End If


ascensor.Top = 5280
If ascensor.Top = 5280 Then
ptres.Caption = "SS2"
pdos.Caption = "SS2"
puno.Caption = "SS2"
ppb.Caption = "SS2"
pss.Caption = "SS2"
psubsuelodos.Caption = "SS2"
pisos.Caption = "SS2"
End If
If ascensor.Top = 5280 Then
csubdos.Caption = csubdos.Caption + 1
End If
If ascensor.Top = 5280 Then
total.Caption = total.Caption + 1
End If
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = False

End Sub

Private Sub controltres_Click()
ascensor.Top = 2400
If ascensor.Top = 2400 Then

ptres.Caption = "3"
pdos.Caption = "3"
puno.Caption = "3"
ppb.Caption = "3"
pss.Caption = "3"
psubsuelodos.Caption = "3"
pisos.Caption = "3"
End If
If ascensor.Top = 2400 Then
ctres.Caption = ctres.Caption + 1
End If
If ascensor.Top = 2400 Then
total.Caption = total.Caption + 1
End If

tres.Enabled = False
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True

End Sub


Private Sub controluno_Click()
ascensor.Top = 3600
If ascensor.Top = 3600 Then


ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
ppb.Caption = "1"
pss.Caption = "1"
psubsuelodos.Caption = "1"
pisos.Caption = "1"
End If
If ascensor.Top = 3600 Then
cuno.Caption = cuno.Caption + 1
End If
If ascensor.Top = 3600 Then
total.Caption = total.Caption + 1
End If

tres.Enabled = True
dos.Enabled = True
uno.Enabled = False
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True
End Sub



Private Sub dos_Click()
ascensor.Top = 3000
If ascensor.Top = 3000 Then
ptres.Caption = "2"
pdos.Caption = "2"
puno.Caption = "2"
ppb.Caption = "2"
pss.Caption = "2"
psubsuelodos.Caption = "2"
pisos.Caption = "2"
End If
If ascensor.Top = 3000 Then
cdos.Caption = cdos.Caption + 1
End If
If ascensor.Top = 3000 Then
total.Caption = total.Caption + 1
End If
tres.Enabled = True
dos.Enabled = False
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True
End Sub

Private Sub escriba_Change()

End Sub

Private Sub Label1_Click()

End Sub

Private Sub ir_Click()
If contraseña.Text = "troto" Then
ascensor.Top = 5280
If ascensor.Top = 5280 Then
ptres.Caption = "ss2"
pdos.Caption = "ss2"
puno.Caption = "ss2"
ppb.Caption = "ss2"
pss.Caption = "ss2"
psubsuelodos.Caption = "ss2"
pisos.Caption = "ss2"
End If
If ascensor.Top = 5280 Then
csubdos.Caption = csubdos.Caption + 1
End If
If ascensor.Top = 5280 Then
total.Caption = total.Caption + 1
End If
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = False
Else
contraseña.Visible = False
ir.Visible = False
Borrar.Visible = False
End If
End Sub

Private Sub luz_Click()
If ascensor.BackColor = vbYellow Then
ascensor.BackColor = vbBlack
Else
ascensor.BackColor = vbYellow
End If
End Sub

Private Sub pb_Click()
ascensor.Top = 4200
If ascensor.Top = 4200 Then

ptres.Caption = "PB"
pdos.Caption = "PB"
puno.Caption = "PB"
ppb.Caption = "PB"
pss.Caption = "PB"
psubsuelodos.Caption = "PB"
pisos.Caption = "PB"
End If
If ascensor.Top = 4200 Then
cpb.Caption = cpb.Caption + 1
End If
If ascensor.Top = 4200 Then
total.Caption = total.Caption + 1
End If
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = False
ss.Enabled = True
subsdos.Enabled = True
subsdos.Enabled = True
End Sub



Private Sub reiniciar_Click()

ctres.Caption = "0"
cdos.Caption = "0"
cuno.Caption = "0"
cpb.Caption = "0"
css.Caption = "0"
csubdos.Caption = "0"
total.Caption = "0"
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True
End Sub

Private Sub ss_Click()
ascensor.Top = 4800
If ascensor.Top = 4800 Then

ptres.Caption = "SS"
pdos.Caption = "SS"
puno.Caption = "SS"
ppb.Caption = "SS"
pss.Caption = "SS"
psubsuelodos.Caption = "SS"
pisos.Caption = "SS"
End If
If ascensor.Top = 4800 Then
css.Caption = css.Caption + 1
End If
If ascensor.Top = 4800 Then
total.Caption = total.Caption + 1
End If

tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = False
subsdos.Enabled = True
End Sub

Private Sub stop_Click()
If tres.Enabled = True Then
tres.Enabled = False
dos.Enabled = False
uno.Enabled = False
pb.Enabled = False
ss.Enabled = False
subsdos.Enabled = False


controltres.Enabled = False
controldos.Enabled = False
controluno.Enabled = False
controlpb.Enabled = False
controlss.Enabled = False
controlsubsuelodos.Enabled = False
reiniciar.Enabled = False
luz.Enabled = False
Else
If tres.Enabled = False Then

tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
controlsubsuelodos.Enabled = True
reiniciar.Enabled = True
luz.Enabled = True
End If
End If
End Sub

Private Sub subs_Click()

End Sub

Private Sub subsdos_Click()
contraseña.Visible = True
Borrar.Visible = True
ir.Visible = True


End Sub


Private Sub tres_Click()
ascensor.Top = 2400
If ascensor.Top = 2400 Then

ptres.Caption = "3"
pdos.Caption = "3"
puno.Caption = "3"
ppb.Caption = "3"
pss.Caption = "3"
psubsuelodos.Caption = "3"
pisos.Caption = "3"
End If
If ascensor.Top = 2400 Then
ctres.Caption = ctres.Caption + 1
End If
If ascensor.Top = 2400 Then
total.Caption = total.Caption + 1
End If
tres.Enabled = False
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True
End Sub

Private Sub uno_Click()
ascensor.Top = 3600
If ascensor.Top = 3600 Then
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
ppb.Caption = "1"
pss.Caption = "1"
psubsuelodos.Caption = "1"
pisos.Caption = "1"
End If
If ascensor.Top = 3600 Then
cuno.Caption = cuno.Caption + 1
End If
If ascensor.Top = 3600 Then
total.Caption = total.Caption + 1
End If
tres.Enabled = True
dos.Enabled = True
uno.Enabled = False
pb.Enabled = True
ss.Enabled = True
subsdos.Enabled = True
End Sub

Friday, November 21, 2008

Ascensor final (por Herno y Marcos)


Private Sub Command1_Click()

End Sub

Private Sub Label1_Click()

End Sub

Private Sub borrar_Click()
contraseña = "contraseña."
cinco.Enabled = True
controlcinco.Enabled = True
End Sub

Private Sub cinco_Click()

auxiliar.Caption = Sqr(((ascensor.Top - 1200) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1200
If ascensor.Top = 1200 Then
pcinco.Caption = "5"
pcuatro.Caption = "5"
ptres.Caption = "5"
pdos.Caption = "5"
puno.Caption = "5"
ppb.Caption = "5"
pss.Caption = "5"
pisos.Caption = "5"
End If
If ascensor.Top = 1200 Then
ccinco.Caption = ccinco.Caption + 1
End If
cinco.Enabled = False
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = False
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub controlcinco_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1200) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
If contraseña = "14" Then
ascensor.Top = 1200
pcinco.Caption = "5"
pcuatro.Caption = "5"
ptres.Caption = "5"
pdos.Caption = "5"
puno.Caption = "5"
ppb.Caption = "5"
pss.Caption = "5"
pisos.Caption = "5"
contraseña = "ACCESO PERMITIDO"
Else
contraseña = "ACCESO DENEGADO"
End If
If ascensor.Top = 1200 Then
ccinco.Caption = ccinco.Caption + 1
End If
cinco.Enabled = False
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = False
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True

End Sub

Private Sub controlcuatro_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1800) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1800
If ascensor.Top = 1800 Then
pcinco.Caption = "4"
pcuatro.Caption = "4"
ptres.Caption = "4"
pdos.Caption = "4"
puno.Caption = "4"
ppb.Caption = "4"
pss.Caption = "4"
pisos.Caption = "4"
End If
If ascensor.Top = 1800 Then
ccuatro.Caption = ccuatro.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = False
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = False
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub controldos_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3000) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3000
If ascensor.Top = 3000 Then
pcinco.Caption = "2"
pcuatro.Caption = "2"
ptres.Caption = "2"
pdos.Caption = "2"
puno.Caption = "2"
ppb.Caption = "2"
pss.Caption = "2"
pisos.Caption = "2"
End If
If ascensor.Top = 3000 Then
cdos.Caption = cdos.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = False
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = False
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub controlpb_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4200) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4200
If ascensor.Top = 4200 Then
pcinco.Caption = "PB"
pcuatro.Caption = "PB"
ptres.Caption = "PB"
pdos.Caption = "PB"
puno.Caption = "PB"
ppb.Caption = "PB"
pss.Caption = "PB"
pisos.Caption = "PB"
End If
If ascensor.Top = 4200 Then
cpb.Caption = cpb.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = False
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = False
controlss.Enabled = True
End Sub

Private Sub controlss_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4800) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4800
If ascensor.Top = 4800 Then
pcinco.Caption = "SS"
pcuatro.Caption = "SS"
ptres.Caption = "SS"
pdos.Caption = "SS"
puno.Caption = "SS"
ppb.Caption = "SS"
pss.Caption = "SS"
pisos.Caption = "SS"
End If
If ascensor.Top = 4800 Then
css.Caption = css.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = False
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = False
End Sub

Private Sub controltres_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
If ascensor.Top = 2400 Then
pcinco.Caption = "3"
pcuatro.Caption = "3"
ptres.Caption = "3"
pdos.Caption = "3"
puno.Caption = "3"
ppb.Caption = "3"
pss.Caption = "3"
pisos.Caption = "3"
End If
If ascensor.Top = 2400 Then
ctres.Caption = ctres.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = False
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = False
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub controluno_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3600) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3600
If ascensor.Top = 3600 Then
pcinco.Caption = "1"
pcuatro.Caption = "1"
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
ppb.Caption = "1"
pss.Caption = "1"
pisos.Caption = "1"
End If
If ascensor.Top = 3600 Then
cuno.Caption = cuno.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = False
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = False
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub cuatro_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1800) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1800
If ascensor.Top = 1800 Then
pcinco.Caption = "4"
pcuatro.Caption = "4"
ptres.Caption = "4"
pdos.Caption = "4"
puno.Caption = "4"
ppb.Caption = "4"
pss.Caption = "4"
pisos.Caption = "4"
End If
If ascensor.Top = 1800 Then
ccuatro.Caption = ccuatro.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = False
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = False
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub dos_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3000) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3000
If ascensor.Top = 3000 Then
pcinco.Caption = "2"
pcuatro.Caption = "2"
ptres.Caption = "2"
pdos.Caption = "2"
puno.Caption = "2"
ppb.Caption = "2"
pss.Caption = "2"
pisos.Caption = "2"
End If
If ascensor.Top = 3000 Then
cdos.Caption = cdos.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = False
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = False
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub luz_Click()
If ascensor.BackColor = vbYellow Then
ascensor.BackColor = vbBlack
Else
ascensor.BackColor = vbYellow
End If
End Sub

Private Sub pb_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4200) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4200
If ascensor.Top = 4200 Then
pcinco.Caption = "PB"
pcuatro.Caption = "PB"
ptres.Caption = "PB"
pdos.Caption = "PB"
puno.Caption = "PB"
ppb.Caption = "PB"
pss.Caption = "PB"
pisos.Caption = "PB"
End If
If ascensor.Top = 4200 Then
cpb.Caption = cpb.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = False
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = False
controlss.Enabled = True
End Sub

Private Sub pcinco_Click()
If ascensor.Top = 1200 Then
pcinco.Caption = "5"
Else
If ascensor.Top = 1800 Then
pcinco.Caption = "4"
Else
If ascensor.Top = 2400 Then
pcinco.Caption = "3"
Else
If ascensor.Top = 3000 Then
pcinco.Caption = "2"
Else
If ascensor.Top = 3600 Then
pcinco.Caption = "1"
Else
If ascensor.Top = 4200 Then
pcinco.Caption = "PB"
Else
If ascensor.Top = 4800 Then
pcinco.Caption = "SS"
Else
End If
End If
End If
End If
End If
End If
End If
End Sub

Private Sub reiniciar_Click()
ccinco.Caption = "0"
ccuatro.Caption = "0"
ctres.Caption = "0"
cdos.Caption = "0"
cuno.Caption = "0"
cpb.Caption = "0"
css.Caption = "0"
total.Caption = "0"
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
End Sub

Private Sub ss_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4800) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4800
If ascensor.Top = 4800 Then
pcinco.Caption = "SS"
pcuatro.Caption = "SS"
ptres.Caption = "SS"
pdos.Caption = "SS"
puno.Caption = "SS"
ppb.Caption = "SS"
pss.Caption = "SS"
pisos.Caption = "SS"
End If
If ascensor.Top = 4800 Then
css.Caption = css.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = False
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = False
End Sub

Private Sub stop_Click()
If cinco.Enabled = True Then
cinco.Enabled = False
cuatro.Enabled = False
tres.Enabled = False
dos.Enabled = False
uno.Enabled = False
pb.Enabled = False
ss.Enabled = False
contraseña.Enabled = False
controlcinco.Enabled = False
controlcuatro.Enabled = False
controltres.Enabled = False
controldos.Enabled = False
controluno.Enabled = False
controlpb.Enabled = False
controlss.Enabled = False
borrar.Enabled = False
reiniciar.Enabled = False
luz.Enabled = False
Else
If cinco.Enabled = False Then
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
contraseña.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
borrar.Enabled = True
reiniciar.Enabled = True
luz.Enabled = True
End If
End If
End Sub

Private Sub total_Click()

End Sub

Private Sub tres_Click()
ascensor.Top = 2400
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
If ascensor.Top = 2400 Then
pcinco.Caption = "3"
pcuatro.Caption = "3"
ptres.Caption = "3"
pdos.Caption = "3"
puno.Caption = "3"
ppb.Caption = "3"
pss.Caption = "3"
pisos.Caption = "3"
End If
If ascensor.Top = 2400 Then
ctres.Caption = ctres.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = False
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = False
controldos.Enabled = True
controluno.Enabled = True
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Private Sub uno_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3600) / 600) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3600
If ascensor.Top = 3600 Then
pcinco.Caption = "1"
pcuatro.Caption = "1"
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
ppb.Caption = "1"
pss.Caption = "1"
pisos.Caption = "1"
End If
If ascensor.Top = 3600 Then
cuno.Caption = cuno.Caption + 1
End If
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = False
pb.Enabled = True
ss.Enabled = True
controlcinco.Enabled = True
controlcuatro.Enabled = True
controltres.Enabled = True
controldos.Enabled = True
controluno.Enabled = False
controlpb.Enabled = True
controlss.Enabled = True
End Sub

Thursday, November 20, 2008

ascensor final (por nico)


aca esta el codigo final del ascensor de vb



Private Sub botonuno_Click()
ascensor.Top = 5040
piso1.Caption = " 1"
pb.Caption = " 1"
ss.Caption = " 1"
piso2.Caption = " 1"
piso3.Caption = " 1"
piso4.Caption = " 1"
piso5.Caption = " 1"
auxiliar5.Caption = auxiliar5.Caption + 1
End Sub

Private Sub botondos_Click()
ascensor.Top = 3840
piso1.Caption = " 2"
pb.Caption = " 2"
ss.Caption = " 2"
piso2.Caption = " 2"
piso3.Caption = " 2"
piso4.Caption = " 2"
piso5.Caption = " 2"
auxiliar4.Caption = auxiliar4.Caption + 1
End Sub

Private Sub botontres_Click()
ascensor.Top = 2640
piso1.Caption = " 3"
pb.Caption = " 3"
ss.Caption = " 3"
piso2.Caption = " 3"
piso3.Caption = " 3"
piso4.Caption = " 3"
piso5.Caption = " 3"
auxiliar3.Caption = auxiliar3.Caption + 1
End Sub

Private Sub botoncuatro_Click()

ascensor.Top = 1440
piso1.Caption = " 4"
pb.Caption = " 4"
ss.Caption = " 4"
piso2.Caption = " 4"
piso3.Caption = " 4"
piso4.Caption = " 4"
piso5.Caption = " 4"
auxiliar2.Caption = auxiliar2.Caption + 1
End Sub

Private Sub botoncinco_Click()
ascensor.Top = 240
piso1.Caption = " 5"
pb.Caption = " 5"
ss.Caption = " 5"
piso2.Caption = " 5"
piso3.Caption = " 5"
piso4.Caption = " 5"
piso5.Caption = " 5"
auxiliar1.Caption = auxiliar1.Caption + 1
End Sub


Private Sub cero_Click()
contraseña.Text = contraseña.Text + "0"
End Sub

Private Sub cinco_Click()
contraseña.Text = contraseña.Text + "5"
End Sub

Private Sub cuatro_Click()
contraseña.Text = contraseña.Text + "4"
End Sub

Private Sub dos_Click()
contraseña.Text = contraseña.Text + "2"
End Sub



Private Sub go_Click()
If contraseña.Text = "4857123" Then
ascensor.Top = 240
piso1.Caption = " 5"
pb.Caption = " 5"
ss.Caption = " 5"
piso2.Caption = " 5"
piso3.Caption = " 5"
piso4.Caption = " 5"
piso5.Caption = " 5"
auxiliar1.Caption = auxiliar1.Caption + 1
contraseña.Text = ""
Else
contraseña.Visible = False
go.Visible = False
uno.Visible = False
dos.Visible = False
tres.Visible = False
cuatro.Visible = False
cinco.Visible = False
seis.Visible = False
siete.Visible = False
ocho.Visible = False
nueve.Visible = False
cero.Visible = False
auxiliar1.Caption = auxiliar1.Caption - 1
End If
End Sub

Private Sub luz_Click()
If ascensor.FillColor = vbgrey Then
ascensor.FillColor = vbYellow
Else
ascensor.FillColor = vbgrey
End If
End Sub

Private Sub nivel1_Click()
ascensor.Top = 5040
piso1.Caption = " 1"
pb.Caption = " 1"
ss.Caption = " 1"
piso2.Caption = " 1"
piso3.Caption = " 1"
piso4.Caption = " 1"
piso5.Caption = " 1"
auxiliar5.Caption = auxiliar5.Caption + 1
End Sub

Private Sub nivel2_Click()
ascensor.Top = 3840
piso1.Caption = " 2"
pb.Caption = " 2"
ss.Caption = " 2"
piso2.Caption = " 2"
piso3.Caption = " 2"
piso4.Caption = " 2"
piso5.Caption = " 2"
auxiliar4.Caption = auxiliar4.Caption + 1
End Sub

Private Sub nivel3_Click()
ascensor.Top = 2640
piso1.Caption = " 3"
pb.Caption = " 3"
ss.Caption = " 3"
piso2.Caption = " 3"
piso3.Caption = " 3"
piso4.Caption = " 3"
piso5.Caption = " 3"
auxiliar3.Caption = auxiliar3.Caption + 1
End Sub

Private Sub nivel4_Click()
ascensor.Top = 1440
piso1.Caption = " 4"
pb.Caption = " 4"
ss.Caption = " 4"
piso2.Caption = " 4"
piso3.Caption = " 4"
piso4.Caption = " 4"
piso5.Caption = " 4"
auxiliar2.Caption = auxiliar2.Caption + 1
End Sub

Private Sub nivel5_Click()
contraseña.Visible = True
go.Visible = True
uno.Visible = True
dos.Visible = True
tres.Visible = True
cuatro.Visible = True
cinco.Visible = True
seis.Visible = True
siete.Visible = True
ocho.Visible = True
nueve.Visible = True
cero.Visible = True

End Sub

Private Sub nueve_Click()
contraseña.Text = contraseña.Text + "9"
End Sub

Private Sub ocho_Click()
contraseña.Text = contraseña.Text + "8"
End Sub

Private Sub pisopb_Click()
ascensor.Top = 6240
piso1.Caption = " pb"
pb.Caption = " pb"
ss.Caption = " pb"
piso2.Caption = " pb"
piso3.Caption = " pb"
piso4.Caption = " pb"
piso5.Caption = " pb"
auxiliar6.Caption = auxiliar6.Caption + 1
End Sub

Private Sub pisoss_Click()
ascensor.Top = 7440
piso1.Caption = " ss"
pb.Caption = " ss"
ss.Caption = " ss"
piso2.Caption = " ss"
piso3.Caption = " ss"
piso4.Caption = " ss"
piso5.Caption = " ss"
auxiliar7.Caption = auxiliar7.Caption + 1
End Sub

Private Sub seis_Click()
contraseña.Text = contraseña.Text + "6"
End Sub

Private Sub siete_Click()
contraseña.Text = contraseña.Text + "7"
End Sub

Private Sub ssboton_Click()
ascensor.Top = 7440
piso1.Caption = " ss"
pb.Caption = " ss"
ss.Caption = " ss"
piso2.Caption = " ss"
piso3.Caption = " ss"
piso4.Caption = " ss"
piso5.Caption = " ss"
auxiliar7.Caption = auxiliar7.Caption + 1
End Sub



Private Sub pboton_Click()
ascensor.Top = 6240
piso1.Caption = " pb"
pb.Caption = " pb"
ss.Caption = " pb"
piso2.Caption = " pb"
piso3.Caption = " pb"
piso4.Caption = " pb"
piso5.Caption = " pb"
auxiliar6.Caption = auxiliar6.Caption + 1
End Sub

Private Sub parar_Click()
If pboton.Enabled = True Then
luz.Enabled = False
pboton.Enabled = False
ssboton.Enabled = False
botonuno.Enabled = False
botondos.Enabled = False
botontres.Enabled = False
botoncuatro.Enabled = False
botoncinco.Enabled = False
pisoss.Enabled = False
pisopb.Enabled = False
nivel1.Enabled = False
nivel2.Enabled = False
nivel3.Enabled = False
nivel4.Enabled = False
nivel5.Enabled = False
Else
luz.Enabled = True
pboton.Enabled = True
ssboton.Enabled = True
botonuno.Enabled = True
botondos.Enabled = True
botontres.Enabled = True
botoncuatro.Enabled = True
botoncinco.Enabled = True
pisoss.Enabled = True
pisopb.Enabled = True
nivel1.Enabled = True
nivel2.Enabled = True
nivel3.Enabled = True
nivel4.Enabled = True
nivel5.Enabled = True

End If
End Sub

Private Sub tres_Click()
contraseña.Text = contraseña.Text + "3"
End Sub

Private Sub uno_Click()
contraseña.Text = contraseña.Text + "1"
End Sub

Ascensor final (por Anita)

Private Sub cinco_Click()
ascensor.Top = 480
numero.Caption = "5"
cant5.Caption = Val(cant5.Caption) + 1
If llamar5.Caption = llamar5.Caption Then
llamar5.Enabled = False
cinco.Enabled = False
End If
llamar4.Enabled = True
cuatro.Enabled = True
llamarss.Enabled = True
ss.Enabled = True
llamarpb.Enabled = True
pb.Enabled = True
llamar1.Enabled = True
uno.Enabled = True
llamar2.Enabled = True
dos.Enabled = True
llamar3.Enabled = True
tres.Enabled = True

End Sub

Private Sub cuatro_Click()
ascensor.Top = 1080
numero.Caption = "4"
cant4.Caption = Val(cant4.Caption) + 1
If llamar4.Caption = llamar4.Caption Then
llamar4.Enabled = False
cuatro.Enabled = False
End If
If cuatro.Caption = cuatro.Caption Then
llamar4.Caption = llamar4.Caption
cuatro.Enabled = False
llamar4.Enabled = False
End If
llamar5.Enabled = True
cinco.Enabled = True
llamarss.Enabled = True
ss.Enabled = True
llamarpb.Enabled = True
pb.Enabled = True
llamar1.Enabled = True
uno.Enabled = True
llamar2.Enabled = True
dos.Enabled = True
llamar3.Enabled = True
tres.Enabled = True
llamar5.Enabled = True
cinco.Enabled = True

End Sub

Private Sub dos_Click()
ascensor.Top = 2280
numero.Caption = "2"
cant2.Caption = Val(cant2.Caption) + 1
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
llamarss.Enabled = True
ss.Enabled = True
llamarpb.Enabled = True
pb.Enabled = True
llamar1.Enabled = True
uno.Enabled = True
llamar3.Enabled = True
tres.Enabled = True


End Sub

Private Sub llamar1_Click()
ascensor.Top = 2880
numero.Caption = "1"
cant1.Caption = Val(cant1.Caption) + 1
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
llamarss.Enabled = True
ss.Enabled = True
llamarpb.Enabled = True
pb.Enabled = True
llamar2.Enabled = True
dos.Enabled = True
llamar3.Enabled = True
tres.Enabled = True
End Sub

Private Sub llamar2_Click()
ascensor.Top = 2280
numero.Caption = "2"
cant2.Caption = Val(cant2.Caption) + 1
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
llamarss.Enabled = True
ss.Enabled = True
llamarpb.Enabled = True
pb.Enabled = True
llamar1.Enabled = True
uno.Enabled = True
llamar3.Enabled = True
tres.Enabled = True
End Sub


Private Sub llamar3_Click()
ascensor.Top = 1680
numero.Caption = "3"
cant3.Caption = Val(cant3.Caption) + 1
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
llamarss.Enabled = True
ss.Enabled = True
llamarpb.Enabled = True
pb.Enabled = True
llamar1.Enabled = True
uno.Enabled = True
llamar2.Enabled = True
dos.Enabled = True
End Sub

Private Sub llamar4_Click()
ascensor.Top = 1080
numero.Caption = "4"
cant4.Caption = Val(cant4.Caption) + 1
piso5.Caption = "4"
llamar4.Enabled = False
cuatro.Enabled = False
llamarss.Enabled = True
ss.Enabled = True
llamarpb.Enabled = True
pb.Enabled = True
llamar1.Enabled = True
uno.Enabled = True
llamar2.Enabled = True
dos.Enabled = True
llamar3.Enabled = True
tres.Enabled = True
llamar5.Enabled = True
cinco.Enabled = True

End Sub

Private Sub llamar5_Click()
ascensor.Top = 480
numero.Caption = "5"
cant5.Caption = Val(cant5.Caption) + 1
piso5.Caption = "5"
If llamar5.Caption = llamar5.Caption Then
llamar5.Enabled = False
cinco.Enabled = False
llamar4.Enabled = True
cuatro.Enabled = True
End If
llamar4.Enabled = True
cuatro.Enabled = True
End Sub

Private Sub llamarpb_Click()
pisopb.Caption = "pb"
ascensor.Top = 3480
numero.Caption = "PB"
cantpb.Caption = Val(cantpb.Caption) + 1
If llamar5.Caption = llamar5.Caption Then
llamarpb.Enabled = False
pb.Enabled = False
End If
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
End Sub

Private Sub llamarss_Click()
ascensor.Top = 4080
numero.Caption = "SS"
cantss.Caption = Val(cantss.Caption) + 1
pisoss.Caption = "ss"
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
End Sub

Private Sub luz_Click()
If ascensor.FillColor = vbWhite Then
ascensor.FillColor = vbYellow
Else
If ascensor.FillColor = vbYellow Then
ascensor.FillColor = vbWhite
End If
End If
End Sub

Private Sub pb_Click()
ascensor.Top = 3480
numero.Caption = "PB"
cantpb.Caption = Val(cantpb.Caption) + 1
pisopb.Caption = "pb"
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
End Sub


Private Sub ss_Click()
ascensor.Top = 4080
numero.Caption = "SS"
cantss.Caption = Val(cantss.Caption) + 1
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
End Sub

Private Sub stop_Click()
If luz.Enabled Then
luz.Enabled = False
cinco.Enabled = False
cuatro.Enabled = False
tres.Enabled = False
dos.Enabled = False
uno.Enabled = False
pb.Enabled = False
ss.Enabled = False
llamarss.Enabled = False
llamarpb.Enabled = False
llamar1.Enabled = False
llamar2.Enabled = False
llamar3.Enabled = False
llamar4.Enabled = False
llamar5.Enabled = False
Else
luz.Enabled = True
cinco.Enabled = True
cuatro.Enabled = True
tres.Enabled = True
dos.Enabled = True
uno.Enabled = True
pb.Enabled = True
ss.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
llamar1.Enabled = True
llamar2.Enabled = True
llamar3.Enabled = True
llamar4.Enabled = True
llamar5.Enabled = True
End If
End Sub

Private Sub tres_Click()
ascensor.Top = 1680
numero.Caption = "3"
cant3.Caption = Val(cant3.Caption) + 1
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
End Sub

Private Sub uno_Click()
ascensor.Top = 2880
numero.Caption = "1"
cant1.Caption = Val(cant1.Caption) + 1
llamar5.Enabled = True
cinco.Enabled = True
llamar4.Enabled = True
cuatro.Enabled = True
End Sub

Friday, November 14, 2008

Ascensor final (por Galu)

Private Sub cinco_Click()


If contraseña.Text = "1234" Then
auxiliar.Caption = Sqr(((ascensor.Top - 720) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 720
contraseña.Text = ""
ncinco.Caption = "5"
ncuatro.Caption = "5"
ntres.Caption = "5"
ndos.Caption = "5"

nuno.Caption = "5"
npb.Caption = "5"
nss.Caption = "5"
marcapiso.Caption = "5"
marcacinco.Caption = marcacinco.Caption + 1

End If
End Sub

Private Sub cuatro_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1560) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1560
ncinco.Caption = "4"
ncuatro.Caption = "4"
ntres.Caption = "4"
ndos.Caption = "4"
nuno.Caption = "4"
npb.Caption = "4"
nss.Caption = "4"
marcapiso.Caption = "4"
marcacuatro.Caption = marcacuatro.Caption + 1
End Sub

Private Sub dos_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3240) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3240
ncinco.Caption = "2"
ncuatro.Caption = "2"
ntres.Caption = "2"
ndos.Caption = "2"
nuno.Caption = "2"
npb.Caption = "2"
nss.Caption = "2"
marcapiso.Caption = "2"
marcados.Caption = marcados.Caption + 1


End Sub

Private Sub llcinco_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 720) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 720
ncinco.Caption = "5"
ncuatro.Caption = "5"
ntres.Caption = "5"
ndos.Caption = "5"
nuno.Caption = "5"
npb.Caption = "5"
nss.Caption = "5"
marcapiso.Caption = "5"

marcacinco.Caption = marcacinco.Caption + 1

End Sub


Private Sub llcuatro_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1560) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1560
ncinco.Caption = "4"
ncuatro.Caption = "4"
ntres.Caption = "4"
ndos.Caption = "4"
nuno.Caption = "4"
npb.Caption = "4"
nss.Caption = "4"
marcapiso.Caption = "4"

marcacuatro.Caption = marcacuatro.Caption + 1

End Sub

Private Sub lldos_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3240) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3240
ncinco.Caption = "2"
ncuatro.Caption = "2"
ntres.Caption = "2"
ndos.Caption = "2"
nuno.Caption = "2"
npb.Caption = "2"
nss.Caption = "2"
marcapiso.Caption = "2"

marcados.Caption = marcados.Caption + 1
End Sub

Private Sub llpb_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4920) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4920
ncinco.Caption = "PB"
ncuatro.Caption = "PB"
ntres.Caption = "PB"
ndos.Caption = "PB"
nuno.Caption = "PB"
npb.Caption = "PB"
nss.Caption = "PB"
marcapiso.Caption = "PB"

marcapb.Caption = marcapb.Caption + 1
End Sub

Private Sub llss_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 5760) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 5760
ncinco.Caption = "SS"
ncuatro.Caption = "SS"
ntres.Caption = "SS"
ndos.Caption = "SS"
nuno.Caption = "SS"
npb.Caption = "SS"
nss.Caption = "SS"
marcapiso.Caption = "SS"

marcass.Caption = marcass.Caption + 1
End Sub

Private Sub lltres_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
ncinco.Caption = "3"
ncuatro.Caption = "3"
ntres.Caption = "3"
ndos.Caption = "3"
nuno.Caption = "3"
npb.Caption = "3"
nss.Caption = "3"
marcapiso.Caption = "3"

marcatres.Caption = marcatres.Caption + 1

End Sub

Private Sub lluno_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4080) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4080
ncinco.Caption = "1"
ncuatro.Caption = "1"
ntres.Caption = "1"
ndos.Caption = "1"
nuno.Caption = "1"
npb.Caption = "1"
nss.Caption = "1"
marcapiso.Caption = "1"

marcauno.Caption = marcauno.Caption + 1
End Sub

Private Sub luz_Click()
If ascensor.BorderColor = vbRed Then
ascensor.BorderColor = vbYellow
Else
ascensor.BorderColor = vbRed
End If
End Sub

Private Sub marcapiso_Click()

End Sub

Private Sub pb_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4920) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4920
ncinco.Caption = "PB"
ncuatro.Caption = "PB"
ntres.Caption = "PB"
ndos.Caption = "PB"
nuno.Caption = "PB"
npb.Caption = "PB"
nss.Caption = "PB"
marcapiso.Caption = "PB"
marcapb.Caption = marcapb.Caption + 1
End Sub

Private Sub ss_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 5760) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 5760
ncinco.Caption = "SS"
ncuatro.Caption = "SS"
ntres.Caption = "SS"
ndos.Caption = "SS"
nuno.Caption = "SS"
npb.Caption = "SS"
nss.Caption = "SS"
marcapiso.Caption = "SS"
marcass.Caption = marcass.Caption + 1
End Sub

Private Sub stop_Click()

If uno.Enabled = True Then
uno.Enabled = False
Else
uno.Enabled = True
End If
If dos.Enabled = True Then
dos.Enabled = False
Else
dos.Enabled = True
End If
If tres.Enabled = True Then
tres.Enabled = False
Else
tres.Enabled = True
End If
If cuatro.Enabled = True Then
cuatro.Enabled = False
Else
cuatro.Enabled = True
End If

If cinco.Enabled = True Then
cinco.Enabled = False
Else
cinco.Enabled = True
End If
If ss.Enabled = True Then
ss.Enabled = False
Else
ss.Enabled = True
End If
If pb.Enabled = True Then
pb.Enabled = False
Else
pb.Enabled = True
End If
If lluno.Enabled = True Then
lluno.Enabled = False
Else
lluno.Enabled = True
End If
If lldos.Enabled = True Then
lldos.Enabled = False
Else
lldos.Enabled = True
End If
If lltres.Enabled = True Then
lltres.Enabled = False
Else
lltres.Enabled = True
End If
If llcuatro.Enabled = True Then
llcuatro.Enabled = False
Else
llcuatro.Enabled = True
End If
If llcinco.Enabled = True Then
llcinco.Enabled = False
Else
llcinco.Enabled = True
End If
If llss.Enabled = True Then
llss.Enabled = False
Else
llss.Enabled = True
End If
If llpb.Enabled = True Then
llpb.Enabled = False
Else
llpb.Enabled = True
End If
If luz.Enabled = True Then
luz.Enabled = False
Else
luz.Enabled = True
End If
marcapiso.Caption = "0"

marcacinco.Caption = "0"
marcacuatro.Caption = "0"
marcatres.Caption = "0"
marcados.Caption = "0"
marcauno.Caption = "0"
marcapb.Caption = "0"
marcass.Caption = "0"
auxiliar.Caption = "0"
cuentapisos.Caption = "0"
End Sub

Private Sub tres_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
ncinco.Caption = "3"
ncuatro.Caption = "3"
ntres.Caption = "3"
ndos.Caption = "3"
nuno.Caption = "3"
npb.Caption = "3"
nss.Caption = "3"
marcapiso.Caption = "3"

marcatres.Caption = marcatres.Caption + 1
End Sub

Private Sub uno_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4080) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4080
ncinco.Caption = "1"
ncuatro.Caption = "1"
ntres.Caption = "1"
ndos.Caption = "1"
nuno.Caption = "1"
npb.Caption = "1"
nss.Caption = "1"
marcapiso.Caption = "1"
marcauno.Caption = marcauno.Caption + 1

End Sub

Ascensor final (por Lula)














Private Sub L1_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4320) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4320
pcinco.Caption = "1"
pcuatro.Caption = "1"
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
pb.Caption = "1"
ss.Caption = "1"
cuentapisos1.Caption = Val(cuentapisos1.Caption) + 1
End Sub

Private Sub L2_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3360) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3360
pcinco.Caption = "2"
pcuatro.Caption = "2"
ptres.Caption = "2"
pdos.Caption = "2"
pb.Caption = "2"
ss.Caption = "2"
puno.Caption = "2"
cuentapisos2.Caption = Val(cuentapisos2.Caption) + 1
End Sub

Private Sub L3_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
pcinco.Caption = "3"
pcuatro.Caption = "3"
ptres.Caption = "3"
pdos.Caption = "3"
pb.Caption = "3"
ss.Caption = "3"
puno.Caption = "3"
cuentapisos3.Caption = Val(cuentapisos3.Caption) + 1
End Sub

Private Sub L4_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1440) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1440
pcinco.Caption = "4"
pcuatro.Caption = "4"
ptres.Caption = "4"
pdos.Caption = "4"
pb.Caption = "4"
ss.Caption = "4"
puno.Caption = "4"
cuentapisos4.Caption = Val(cuentapisos4.Caption) + 1
End Sub

Private Sub L5_Click()
If contraseña = "hola" Then
auxiliar.Caption = Sqr(((ascensor.Top - 480) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 480
pcinco.Caption = "5"
pcuatro.Caption = "5"
ptres.Caption = "5"
pdos.Caption = "5"
pb.Caption = "5"
ss.Caption = "5"
puno.Caption = "5"
cuentapisos5.Caption = Val(cuentapisos5.Caption) + 1
End If
End Sub


Private Sub ll1_Click(Index As Integer)
auxiliar.Caption = Sqr(((ascensor.Top - 4320) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4320
pcinco.Caption = "1"
pcuatro.Caption = "1"
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
pb.Caption = "1"
ss.Caption = "1"
End Sub

Private Sub ll2_Click(Index As Integer)
auxiliar.Caption = Sqr(((ascensor.Top - 3360) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3360
pcinco.Caption = "2"
pcuatro.Caption = "2"
ptres.Caption = "2"
pdos.Caption = "2"
pb.Caption = "2"
ss.Caption = "2"
puno.Caption = "2"
End Sub

Private Sub ll3_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
pcinco.Caption = "3"
pcuatro.Caption = "3"
ptres.Caption = "3"
pdos.Caption = "3"
pb.Caption = "3"
ss.Caption = "3"
puno.Caption = "3"
End Sub

Private Sub ll4_Click(Index As Integer)
auxiliar.Caption = Sqr(((ascensor.Top - 1440) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1440
pcinco.Caption = "4"
pcuatro.Caption = "4"
ptres.Caption = "4"
pdos.Caption = "4"
pb.Caption = "4"
ss.Caption = "4"
puno.Caption = "4"

End Sub

Private Sub ll5_Click(Index As Integer)
If contraseña = "hola" Then
auxiliar.Caption = Sqr(((ascensor.Top - 480) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 480
pcinco.Caption = "5"
pcuatro.Caption = "5"
ptres.Caption = "5"
pdos.Caption = "5"
pb.Caption = "5"
ss.Caption = "5"
puno.Caption = "5"

End If
End Sub

Private Sub llamar1_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4320) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4320
pcinco.Caption = "1"
pcuatro.Caption = "1"
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
pb.Caption = "1"
ss.Caption = "1"
cuentapisos1.Caption = Val(cuentapisos1.Caption) + 1
End Sub

Private Sub llamarcinco_Click()
If contraseña = "hola" Then
auxiliar.Caption = Sqr(((ascensor.Top - 480) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 480
pcinco.Caption = "5"
pcuatro.Caption = "5"
ptres.Caption = "5"
pdos.Caption = "5"
pb.Caption = "5"
ss.Caption = "5"
puno.Caption = "5"
cuentapisos5.Caption = Val(cuentapisos5.Caption) + 1

End If
End Sub

Private Sub llamarcuatro_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1440) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1440
pcinco.Caption = "4"
pcuatro.Caption = "4"
ptres.Caption = "4"
pdos.Caption = "4"
pb.Caption = "4"
ss.Caption = "4"
puno.Caption = "4"
cuentapisos4.Caption = Val(cuentapisos4.Caption) + 1
auxiliar.Caption = (ascensor.Top - 1560) / 840
End Sub

Private Sub llamardos_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3360) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3360
pcinco.Caption = "2"
pcuatro.Caption = "2"
ptres.Caption = "2"
pdos.Caption = "2"
pb.Caption = "2"
ss.Caption = "2"
puno.Caption = "2"
cuentapisos2.Caption = Val(cuentapisos2.Caption) + 1
End Sub


Private Sub llamarpb_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 5280) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 5280
pcinco.Caption = "PB"
pcuatro.Caption = "PB"
ptres.Caption = "PB"
pdos.Caption = "PB"
pb.Caption = "PB"
ss.Caption = "PB"
puno.Caption = "PB"

End Sub

Private Sub llamarss_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 6240) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 6240
pcinco.Caption = "SS"
pcuatro.Caption = "SS"
ptres.Caption = "SS"
pdos.Caption = "SS"
pb.Caption = "SS"
ss.Caption = "SS"
puno.Caption = "SS"

End Sub

Private Sub llamartres_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
pcinco.Caption = "3"
pcuatro.Caption = "3"
ptres.Caption = "3"
pdos.Caption = "3"
pb.Caption = "3"
ss.Caption = "3"
puno.Caption = "3"
cuentapisos3.Caption = Val(cuentapisos3.Caption) + 1

End Sub

Private Sub llpb_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 5280) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 5280
pcinco.Caption = "PB"
pcuatro.Caption = "PB"
ptres.Caption = "PB"
pdos.Caption = "PB"
pb.Caption = "PB"
ss.Caption = "PB"
puno.Caption = "PB"
End Sub

Private Sub llss_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 6240) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 6240
pcinco.Caption = "SS"
pcuatro.Caption = "SS"
ptres.Caption = "SS"
pdos.Caption = "SS"
pb.Caption = "SS"
ss.Caption = "SS"
puno.Caption = "SS"
End Sub

Private Sub LPB_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 5280) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 5280
pcinco.Caption = "PB"
pcuatro.Caption = "PB"
ptres.Caption = "PB"
pdos.Caption = "PB"
pb.Caption = "PB"
ss.Caption = "PB"
puno.Caption = "PB"
cuentapisospb.Caption = Val(cuentapisospb.Caption) + 1
End Sub

Private Sub LSS_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 6240) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 6240
pcinco.Caption = "SS"
pcuatro.Caption = "SS"
ptres.Caption = "SS"
pdos.Caption = "SS"
pb.Caption = "SS"
ss.Caption = "SS"
puno.Caption = "SS"
cuentapisosss.Caption = Val(cuentapisosss.Caption) + 1
End Sub

Private Sub luz_Click()
If ascensor.FillColor = vbBlack Then
ascensor.FillColor = vbWhite
Else
If ascensor.FillColor = vbWhite Then
ascensor.FillColor = vbBlack

End If

End If
End Sub


Private Sub stop_Click()
If llamar1.Enabled = True Then
llamar1.Enabled = False
llamardos.Enabled = False
llamartres.Enabled = False
llamarcuatro.Enabled = False
llamarcinco.Enabled = False
llamarss.Enabled = False
llamarpb.Enabled = False
L1.Enabled = False
L2.Enabled = False
L3.Enabled = False
L4.Enabled = False
L5.Enabled = False
LPB.Enabled = False
LSS.Enabled = False
luz.Enabled = False
pcinco.Enabled = False
pcuatro.Enabled = False
ptres.Enabled = False
pdos.Enabled = False
pb.Enabled = False
ss.Enabled = False
puno.Enabled = False


Else
llamar1.Enabled = True
llamardos.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamarcinco.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
luz.Enabled = True
pcinco.Enabled = True
pcuatro.Enabled = True
ptres.Enabled = True
pdos.Enabled = True
pb.Enabled = True
ss.Enabled = True
puno.Enabled = True
End If
End Sub

Ascensor final (por Iaru)
















Private Sub L1_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4320) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4320
pcinco.Caption = "1"
pcuatro.Caption = "1"
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
pb.Caption = "1"
ss.Caption = "1"
cuentapisos1.Caption = Val(cuentapisos1.Caption) + 1
L1.Enabled = False
llamar1.Enabled = False
llamardos.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamarcinco.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End Sub

Private Sub L2_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3360) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3360
pcinco.Caption = "2"
pcuatro.Caption = "2"
ptres.Caption = "2"
pdos.Caption = "2"
pb.Caption = "2"
ss.Caption = "2"
puno.Caption = "2"
cuentapisos2.Caption = Val(cuentapisos2.Caption) + 1
L2.Enabled = False
llamardos.Enabled = False
llamar1.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamarcinco.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End Sub

Private Sub L3_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
pcinco.Caption = "3"
pcuatro.Caption = "3"
ptres.Caption = "3"
pdos.Caption = "3"
pb.Caption = "3"
ss.Caption = "3"
puno.Caption = "3"
cuentapisos3.Caption = Val(cuentapisos3.Caption) + 1
L3.Enabled = False
llamartres.Enabled = False
llamar1.Enabled = True
llamardos.Enabled = True
llamarcuatro.Enabled = True
llamarcinco.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True

End Sub

Private Sub L4_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1440) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1440
pcinco.Caption = "4"
pcuatro.Caption = "4"
ptres.Caption = "4"
pdos.Caption = "4"
pb.Caption = "4"
ss.Caption = "4"
puno.Caption = "4"
cuentapisos4.Caption = Val(cuentapisos4.Caption) + 1
L4.Enabled = False
llamarcuatro.Enabled = False
llamar1.Enabled = True
llamardos.Enabled = True
llamartres.Enabled = True
llamarcinco.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End Sub

Private Sub L5_Click()
If contraseña = "hola" Then
auxiliar.Caption = Sqr(((ascensor.Top - 480) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 480
pcinco.Caption = "5"
pcuatro.Caption = "5"
ptres.Caption = "5"
pdos.Caption = "5"
pb.Caption = "5"
ss.Caption = "5"
puno.Caption = "5"
cuentapisos5.Caption = Val(cuentapisos5.Caption) + 1
L5.Enabled = False
llamarcinco.Enabled = False
llamar1.Enabled = True
llamardos.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End If
End Sub

Private Sub llamar1_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 4320) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 4320
pcinco.Caption = "1"
pcuatro.Caption = "1"
ptres.Caption = "1"
pdos.Caption = "1"
puno.Caption = "1"
pb.Caption = "1"
ss.Caption = "1"
cuentapisos1.Caption = Val(cuentapisos1.Caption) + 1
llamar1.Enabled = False
L1.Enabled = False
llamardos.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamarcinco.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End Sub

Private Sub llamarcinco_Click()
If contraseña = "hola" Then
auxiliar.Caption = Sqr(((ascensor.Top - 480) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 480
pcinco.Caption = "5"
pcuatro.Caption = "5"
ptres.Caption = "5"
pdos.Caption = "5"
pb.Caption = "5"
ss.Caption = "5"
puno.Caption = "5"
cuentapisos5.Caption = Val(cuentapisos5.Caption) + 1
llamarcinco.Enabled = False
L5.Enabled = False
llamar1.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamardos.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End If
End Sub

Private Sub llamarcuatro_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 1440) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 1440
pcinco.Caption = "4"
pcuatro.Caption = "4"
ptres.Caption = "4"
pdos.Caption = "4"
pb.Caption = "4"
ss.Caption = "4"
puno.Caption = "4"
cuentapisos4.Caption = Val(cuentapisos4.Caption) + 1
llamarcuatro.Enabled = False
L4.Enabled = False
llamarcinco.Enabled = True
llamar1.Enabled = True
llamartres.Enabled = True
llamardos.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End Sub

Private Sub llamardos_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 3360) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 3360
pcinco.Caption = "2"
pcuatro.Caption = "2"
ptres.Caption = "2"
pdos.Caption = "2"
pb.Caption = "2"
ss.Caption = "2"
puno.Caption = "2"
cuentapisos2.Caption = Val(cuentapisos2.Caption) + 1
llamardos.Enabled = False
L2.Enabled = False
llamarcinco.Enabled = True
llamar1.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
End Sub


Private Sub llamarpb_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 5280) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 5280
pcinco.Caption = "PB"
pcuatro.Caption = "PB"
ptres.Caption = "PB"
pdos.Caption = "PB"
pb.Caption = "PB"
ss.Caption = "PB"
puno.Caption = "PB"
cuentapisospb.Caption = Val(cuentapisospb.Caption) + 1
llamarpb.Enabled = False
LPB.Enabled = False
llamarcinco.Enabled = True
llamar1.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamardos.Enabled = True
llamarss.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LSS.Enabled = True

End Sub

Private Sub llamarss_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 6240) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 6240
pcinco.Caption = "SS"
pcuatro.Caption = "SS"
ptres.Caption = "SS"
pdos.Caption = "SS"
pb.Caption = "SS"
ss.Caption = "SS"
puno.Caption = "SS"
cuentapisosss.Caption = Val(cuentapisosss.Caption) + 1
llamarss.Enabled = False
LSS.Enabled = False
llamarcinco.Enabled = True
llamar1.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamardos.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True

End Sub

Private Sub llamartres_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 2400) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 2400
pcinco.Caption = "3"
pcuatro.Caption = "3"
ptres.Caption = "3"
pdos.Caption = "3"
pb.Caption = "3"
ss.Caption = "3"
puno.Caption = "3"
cuentapisos3.Caption = Val(cuentapisos3.Caption) + 1
llamartres.Enabled = False
L3.Enabled = False
llamarcinco.Enabled = True
llamar1.Enabled = True
llamarcuatro.Enabled = True
llamardos.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True

End Sub

Private Sub LPB_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 5280) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 5280
pcinco.Caption = "PB"
pcuatro.Caption = "PB"
ptres.Caption = "PB"
pdos.Caption = "PB"
pb.Caption = "PB"
ss.Caption = "PB"
puno.Caption = "PB"
cuentapisospb.Caption = Val(cuentapisospb.Caption) + 1
LPB.Enabled = False
llamarpb.Enabled = False
llamarcinco.Enabled = True
llamar1.Enabled = True
llamarcuatro.Enabled = True
llamardos.Enabled = True
llamarss.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
llamartres.Enabled = True
LSS.Enabled = True

End Sub

Private Sub LSS_Click()
auxiliar.Caption = Sqr(((ascensor.Top - 6240) / 840) ^ 2)
cuentapisos.Caption = Val(cuentapisos.Caption) + Val(auxiliar.Caption)
ascensor.Top = 6240
pcinco.Caption = "SS"
pcuatro.Caption = "SS"
ptres.Caption = "SS"
pdos.Caption = "SS"
pb.Caption = "SS"
ss.Caption = "SS"
puno.Caption = "SS"
cuentapisosss.Caption = Val(cuentapisosss.Caption) + 1
LSS.Enabled = False
llamarss.Enabled = False
llamarcinco.Enabled = True
llamar1.Enabled = True
llamarcuatro.Enabled = True
llamardos.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
llamartres.Enabled = True

End Sub

Private Sub luz_Click()
If ascensor.FillColor = vbBlack Then
ascensor.FillColor = vbWhite
Else
If ascensor.FillColor = vbWhite Then
ascensor.FillColor = vbBlack

End If

End If
End Sub


Private Sub stop_Click()
If llamar1.Enabled = True Then
llamar1.Enabled = False
llamardos.Enabled = False
llamartres.Enabled = False
llamarcuatro.Enabled = False
llamarcinco.Enabled = False
llamarss.Enabled = False
llamarpb.Enabled = False
L1.Enabled = False
L2.Enabled = False
L3.Enabled = False
L4.Enabled = False
L5.Enabled = False
LPB.Enabled = False
LSS.Enabled = False
luz.Enabled = False
pcinco.Enabled = False
pcuatro.Enabled = False
ptres.Enabled = False
pdos.Enabled = False
pb.Enabled = False
ss.Enabled = False
puno.Enabled = False


Else
llamar1.Enabled = True
llamardos.Enabled = True
llamartres.Enabled = True
llamarcuatro.Enabled = True
llamarcinco.Enabled = True
llamarss.Enabled = True
llamarpb.Enabled = True
L1.Enabled = True
L2.Enabled = True
L3.Enabled = True
L4.Enabled = True
L5.Enabled = True
LPB.Enabled = True
LSS.Enabled = True
luz.Enabled = True
pcinco.Enabled = True
pcuatro.Enabled = True
ptres.Enabled = True
pdos.Enabled = True
pb.Enabled = True
ss.Enabled = True
puno.Enabled = True
End If
End Sub