如题!用什么方法来实现,是否用一定时器统计一段时间内是否有鼠标与键盘事件,
系统的鼠标与键盘事件如何获取?
系统的鼠标与键盘事件如何获取?
解决方案 »
- 如何根据Record的字段名称赋值
- 请问'dataset not in insert or edit mode'是什么意思?
- combobox的问题
- 在窗口中绘图,我这样使用 bitblt 函数 为什么没有任何效果?
- 为什么我的IDL2PAS程序要提示:无法定位程序输入点@CORBA_ANY@len$xqv于动态连接库ORB_BR.DLL上?
- 請問:delphi5作的模塊如何集成到delphi6作的系統中去呀?急!!!!!
- fastreport学习
- 看这是delphi帮助上的例子?是它有问题,还是我不懂?
- 一个关于API的问题?
- WPS2000专业版中打印反片的功能用DELPHI如何实现(我想打印反片报表),给点解决思路也行
- Service与SQL2000数据库使用,内存泄露
- delphi上 用ADOQuery导入数据问题??
Application.OnIdle:=showROck;
showROck;过程为自己定义,show出rock窗体,show模式要是showmodal。
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;type
TForm1 = class(TForm)
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end; function BlockInput(fFreezeInput : boolean):DWord; stdcall; external 'user32.DLL';var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Timer1Timer(Sender: TObject);
var
vLastInputInfo: TLastInputInfo;
begin
vLastInputInfo.cbSize := SizeOf(vLastInputInfo);
GetLastInputInfo(vLastInputInfo);
if GetTickCount - vLastInputInfo.dwTime > 3000 then
begin
timer1.Enabled:= false;
BlockInput(True);
showmessage('超过3秒,已锁定!');
end;
end;end.