private<br> procedure MyMessage(var Msg: tagMSG;var Handled: Boolean);<br> procedure MyIdle(Sender: TObject;var Done: Boolean);<br><br>...<br>procedure TForm1.FormCreate(Sender: TObject); <br>begin<br> Application.OnIdle :=MyIdle; <br> application.OnMessage := MyMessage;<br>end;<br>procedure TForm1.MyMessage(var Msg: tagMSG;<br> var Handled: Boolean);<br>begin<br> //// if (Msg.Message=wm_lMouseDown)....then //可再对消息具体进行判断和过滤处理<br> Timer1.Enabled := False;<br>end;<br><br>procedure TForm1.MyIdle(Sender: TObject;<br> var Done: Boolean);<br>begin<br> Timer1.Enabled := True;<br>end;<br><br>procedure TForm1.Timer1Timer(Sender: TObject);<br>begin <br> showmessage('30分钟未动')<br>end;