Mostrando entradas con la etiqueta Ascensor final. Mostrar todas las entradas
Mostrando entradas con la etiqueta Ascensor final. Mostrar todas las entradas

viernes, 14 de noviembre de 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