由于ICMP被屏蔽,所以无法用ping测试网络是否正常。所以我想通过获取网页头作为测试,例如获取www.163.com等,然后判断是否正常。如果正常就显示正常,获取不了就显示不正常,如此循环。谢谢

解决方案 »

  1.   

    用ICS的HTTPCli组件就可以的_____________________
    http://lysoft.7u7.net
      

  2.   

    uses  WinInetfunction  IsInternet:  Boolean;  
    begin  
       if  InternetCheckConnection('http://www.163.com/',  1,  0)  then  
           Result  :=  True  
       else  
           Result  :=  False;  
    end;
      

  3.   

    这样调用函数:if IsInternet then
    begin  
           Showmessage('已连接到因特网!!');    
       end  
    else  
       begin  
           Showmessage('不能连接网络!!!')  
       end;
      

  4.   

    回复人: hthunter(核桃-我的心在下雨,雨中我和她携手漫步) ( ) 信誉:113  2005-08-12 10:37:00  得分: 0  
     
     
       如果你连的服务器刚好出问题了呢(其他网站正常)?
      
     
    >>>那就检测  www.microsoft.com  应该不会倒闭。呵呵。