不用的。
www.delphi3000.com 的 Internet 专栏里有例程,大概4、5行代码。

解决方案 »

  1.   

    to SunnyWay:请您将源码拷过来,分就给你啦!
      

  2.   

    不知道 llhh的问题搞定没有?
    贴在下面了:Question/Problem/Abstract:
        How can my application tell if the machine is connected to a 
    network under Windows 95? 
     
    Answer:
        You can call the Windows API function GetSystemMetrics() and pass 
    the SM_NETWORK flag. Example: procedure TForm1.Button1Click(Sender: TObject); 
    begin 
      if GetSystemMetrics(SM_NETWORK) AND $01 = $01 then 
        ShowMessage('Machine is attached to network') else 
        ShowMessage('Machine is not attached to network'); 
    end; 
     
      

  3.   


    Function HasInternetconnect:boolean;
    var REG:TRegistry;
        dat:array[0..3] of char;
    begin
      reg:=TRegistry.Create;
      reg.RootKey:=HKEY_LOCAL_MACHINE;
      reg.OpenKey('System\CurrentControlSet\Services\RemoteAccess',false);
      reg.ReadBinaryData('Remote Connection',dat,4);
      reg.free;
      result:=(dat[0]=#1);
    end;
      if  HasInternetconnect 
      then     showmessage('connect')
      else     showmessage('disconnect');