我测试一楼的没问题。
三楼的改成这样试试
try If Network.Ping("www.baidu.com") Then Messagebox.Show("通") End IfCatch ex As Exception messagebox.show("不通")End try