Ver Mensaje Individual
  #3  
Antiguo 23-03-2010
[maeyanes] maeyanes is offline
Capo de los Capos
 
Registrado: may 2003
Ubicación: Campeche, México
Posts: 2.732
Reputación: 24
maeyanes Va por buen camino
Hola...

Otra opción es redefinir el método UpdateActions de la clase TForm:

Código Delphi [-]
TMyForm = class(TForm)
protected
  procedure UpdateActions; override;
end;

implementation

procedure TMyForm.UpdateActions;
var
  CurrentTime: TTime;

begin
  inherited;
  CurrentTime := Now;
  btnEntrada.Enabled := (CurrentTime >= StrToTime('8')) and (CurrentTime <= StrToTime('11:59'));
  btnEntradaComida.Enabled := (CurrentTime >= StrToTime('12')) and (CurrentTime <= StrToTime('13:59'))
end;


Saludos...
Responder Con Cita