Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/04/2006, 13:02
Avatar de vbx3m
vbx3m
 
Fecha de Ingreso: febrero-2005
Ubicación: Venezuela
Mensajes: 524
Antigüedad: 20 años, 3 meses
Puntos: 1
Cita:
Iniciado por XP.
A mi me da error cuando pongo lo que quiero hacer en este codigo

Timer1.enabled = True
Timer1.interval = 0
Label88.caption = 0
Private Sub Timer1_timer()
Label88.caption = Label88.caption + 1
If label88.caption = 1 then
ACA SE CIERRAN TODAS LAS VENTANAS QUE ESTEN ABIERTAS
end if
If label88.caption = 3 Then
ACA SE EJECUTA EL HL.EXE
end if
If label88.caption = 5 then
ACA SE CIERRA EL HL.EXE
end if
If label88.caption = 7 then
label88.caption = 0
timer1.enabled = False
end if
end sub

para que se ejecute el CS uso la funcion "Shell"

y para cerrar el proceso "hl.exe" usao Killapp "hl.exe" pero no anda
Primer el al Timer le debes asignar un intervalo.. si esta en 0 no "corre" el tiempo... Me imagino q lo que quieres hacer con el label88 es un contador...

Prueba asi:

Código:
Dim xseg As Integer
Private Sub Form_Load()
xseg = 0
Timer1.Enabled = True
Timer1.Interval = 1000   'El intervalo de 1 seg
Label88.Caption = 0
End Sub

Private Sub Timer1_timer()
xseg = xseg + 1
Label88.Caption = xseg
If xseg = 1 Then
'ACA SE CIERRAN TODAS LAS VENTANAS QUE ESTEN ABIERTAS
End If
If xseg = 3 Then
'ACA SE EJECUTA EL HL.EXE
End If
If xseg = 5 Then
'ACA SE CIERRA EL HL.EXE
End If
If xseg = 7 Then
   xseg = 0
   Label88.Caption = xseg
   Timer1.Enabled = False
End If
End Sub
__________________
ホルヘ・ラファエル・マルティネス・レオン