本文整理自网络,侵删。
function BlockInput(fBlockInput: Boolean): DWORD; stdcall;external 'user32.dll';//delphitop.com
//点击按钮,系统会禁止一切输入操作,5秒后解除锁定。procedure TForm2.Button1Click(Sender: TObject);
begin BlockInput(True); Label1.Caption := 'Blocked'; Application.ProcessMessages; Sleep(5000); BlockInput(False); Label1.Caption := 'Unblocked';end;
相关阅读 >>
Delphi try abort、exit except 、finally end 执行情况
Delphi xe 泛型数组和splitstring处理数据
Delphi - 利用dll编程控制摄像头实现拍照、录制视频
更多相关阅读请进入《Delphi》频道 >>