]、。·ˉˇ¨〃々—~‖…’”〕〉》」』〗】∶!"'),.:;?]` const TimeOut=600000;
procedure TForm1.FormCreate(Sender: TObject);
begin
Timer1.Interval :=TimeOut;
Start:=GetTickCount;
Application.OnMessage :=MyMessage;
end;
procedure TForm1.MyMessage(var Msg: TMsg;var Handled: Boolean);
begin
case Msg.message of
WM_MouseMove :Start:=GetTickCount;
WM_LBUTTONDOWN :Start:=GetTickCount;
WM_RBUTTONDOWN :Start:=GetTickCount;
//WM_MOUSEWHEEL :Start:=GetTickCount;
WM_KeyDown :Start:=GetTickCount;
WM_Char :Start:=GetTickCount;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if GetTickCount-Start>=TimeOut then
begin
Start:=GetTickCount;
Application.Minimize;
end;
end;