J
jacklee
Unregistered / Unconfirmed
GUEST, unregistred user!
这个问题在以前的帖子中有我知道.我是通过代理服务器上网的.adsl.目前的问题是无法实时
判断是否上网了.必须重新启动才可以判断.
这是我在以前的帖子中摘抄的:
[][]use wininete;
procedure TForm1.Button1Click(Sender: TObject);
begin
if GetOnlineStatus then
ShowMessage(' Connected')
else ShowMessage(' not Connected');
end;
function Tform1.GetOnlineStatus : Boolean;
var ConTypes : Integer;
begin
ConTypes := INTERNET_CONNECTION_MODEM + INTERNET_CONNECTION_LAN ;
if (InternetGetConnectedState(@ConTypes, 0) = False)
then Result := False
else Result := True;
end;
判断是否上网了.必须重新启动才可以判断.
这是我在以前的帖子中摘抄的:
[][]use wininete;
procedure TForm1.Button1Click(Sender: TObject);
begin
if GetOnlineStatus then
ShowMessage(' Connected')
else ShowMessage(' not Connected');
end;
function Tform1.GetOnlineStatus : Boolean;
var ConTypes : Integer;
begin
ConTypes := INTERNET_CONNECTION_MODEM + INTERNET_CONNECTION_LAN ;
if (InternetGetConnectedState(@ConTypes, 0) = False)
then Result := False
else Result := True;
end;