Hi, I use the following code to detect if the system date/time changes:
************************************************************
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;
**********************************************************
It works fine, but sometimes when the computer remains "on" during the night, in some moment, the event fires. What other reasons would fire this event beside the users change the system date/time?
thanks
************************************************************
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;
**********************************************************
It works fine, but sometimes when the computer remains "on" during the night, in some moment, the event fires. What other reasons would fire this event beside the users change the system date/time?
thanks