本文整理自网络,侵删。
use WinInet;
//正确检测是否在线方法
if InternetGetConnectedState(nil, 0) then
begin
Self.Caption := '在线';
end
else
begin
Self.Caption := '脱机';
end;
经测试,和QQ检测是否在线基本相同。
相关阅读 >>
Delphi tms web core直接从html&css设计的页面布局
更多相关阅读请进入《Delphi》频道 >>