» Help

How to handle a system time change

   

If you need to react when system date time has changed you can handle the WM_TimeChange Windows message.

type
   TForm1 = class(TForm)
   private
     procedure WMTimeChange(var Msg: TMessage) ; message WM_TIMECHANGE;
   end;
 
var
   Form1: TForm1;
 
implementation
{$R *.DFM}
 
procedure TForm1.WMTimeChange(var Msg: TMessage) ;
begin
   inherited;
   ShowMessage('Date/Time has changed!') ;
end;
Author: Unknown
Contributor: topellina
Added: 2013-09-06
Last updated: 2013-09-06

« Return to contents »