1 //this code is helpful if you want to write an app to detect whenever 2 //the system time of you PC has changed. 3 unit Unit1; 4 5 interface 6 7 uses 8 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 Dialogs, StdCtrls; 10 11 type 12 TForm1 = class(TForm) 13 Button1: TButton; 14 procedure Button1Click(Sender: TObject); 15 private 16 procedure WMTIMECHANGE(var message: TWMTIMECHANGE); 17 message WM_TIMECHANGE; 18 19 { Private declarations } 20 public 21 { Public declarations } 22 end; 23 24 var 25 Form1: TForm1; 26 27 implementation 28 29 {$R *.dfm} 30 31 procedure TForm1.Button1Click(Sender: TObject); 32 begin 33 close; 34 end; 35 36 procedure TForm1.WMTIMECHANGE(var message: TWMTIMECHANGE); 37 begin 38 ShowMessage('Time changed'); 39 end; 40 41 end.