本文整理自网络,侵删。
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;
相关阅读 >>
processid, process handle, window handle 之间的互相转换
Delphi tstreamreader 和tstreamwriter
Delphi d10.x安卓app开发中简单使用原生toast
Delphi webbrowser载入自定义html内容并显示
更多相关阅读请进入《Delphi》频道 >>