If My.Computer.Network.Ping("192.168.0.1") = True Then MsgBox("网络连通") Else MsgBox("网络不通") End If你把 IP 地址改成你需要的即可