本文整理自网络,侵删。
function GetLastInput: integer; //获取闲置时间
var
LInput: TLastInputInfo;
begin
Result := 0;
try
LInput.cbSize := SizeOf(TLastInputInfo);
GetLastInputInfo(LInput);
Result := ((GetTickCount - LInput.dwTime) div 1000);
except
end;
end;
相关阅读 >>
Delphi 在rxrichedit中插入图片的完美解决方法
Delphi 获取动态创建的image与scrollbox的相对位置
更多相关阅读请进入《Delphi》频道 >>