本文整理自网络,侵删。
procedure TForm1.Timer1Timer(Sender: TObject);
var vLastInputInfo: TLastInputInfo;
begin
vLastInputInfo.cbSize := SizeOf(vLastInputInfo);
GetLastInputInfo(vLastInputInfo);
if GetTickCount - vLastInputInfo.dwTime > 5000 then
begin
timer1.Enabled:= false;
showmessage('超过5秒,用户未动鼠标!');
end;
end;
相关阅读 >>
delphDelphi chromium embedded 清除指定链接浏览器缓存、cookies
Delphi xe的firemonkey获取当前文件所在路径的方法
Delphi读取webbrowse中的图片显示在image中
更多相关阅读请进入《Delphi》频道 >>