Ver Mensaje Individual
  #10  
Antiguo 29-05-2008
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.307
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Pon en un formulario un Label, un boton de Iniciar un boton de parar y un Timer.
El Timer configuralo con un intervalo de 250 (por ejemplo) e inicialmente Enabled = False;

En el boton de iniciar colocas
Código Delphi [-]
  Timer1.Enabled := True;
  _inicial := -1;

En al botón de parar:
Código Delphi [-]
Timer1.Enabled := False;

Y en el evento del Timer:
Código Delphi [-]
  if (_inicial = -1) then begin
    _inicial := Now;
  end;
  Label1.Caption := FormatDateTime('hh:nn:ss', (Now - _inicial));

Define _inicial en la parte privada como Double.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita