Delphi 检测应用程序是否已停止响应
2022-12-27 12:42:08 作者:admin
本文整理自网络,侵删。
procedure TForm2.Button1Click(Sender: TObject);var H : THandle; lngReturnValue : longint; DWResult : DWORD;begin H := FindWindow('Notepad', nil); if H > 0 then begin lngReturnValue := SendMessageTimeout( H, WM_NULL, 0, 0, SMTO_ABORTIFHUNG And SMTO_BLOCK, 1000, DWResult );//delphitop.com if lngReturnValue > 0 then ShowMessage('响应') else ShowMessage('Not 响应'); end else ShowMessage('Application not found');end;
相关阅读 >>
Delphi 获取本地ip地址源码
Delphi得到字符串中第一个汉字的位置
Delphi共享软件防破解的实用方法
Delphi 调用shellexecute打开txt文本
Delphi根据网络链接截取域名
Delphi 动态生成九宫格按钮
Delphi控制摄像头
Delphi2010读取mysql数据库text类型乱码的解决方案
Delphi 字符串中加入换行符slinebreak
字符串截取小例子Delphi源代码
更多相关阅读请进入《Delphi》频道 >>
猜你喜欢
联络方式:
400-123-789
邮箱:xiachao@163.com
Q Q:12345678
微信公众号
微信二维码