Ping送信には、方法がいくつかあります。その一部を記載します。
・System.Net.NetworkInformationをインポートしておきます。
My.Computer.Network.Pingメソッドを使用する方法
If My.Computer.Network.Ping("yahoo.com") Then
MessageBox.Show("Pingに成功")
Else
MessageBox.Show("Pingに失敗")
End If
Pingクラスを使用する方法
'Pingオブジェクトを作成
Using ping As New System.Net.NetworkInformation.Ping()
'Pingを送信し結果を取得する
Dim reply As System.Net.NetworkInformation.PingReply = ping.Send("yahoo.com")
If reply.Status = System.Net.NetworkInformation.IPStatus.Success Then
MessageBox.Show(String.Format("PingReply {0}:bytes={1} time={2}ms",
reply.Address, reply.Buffer.Length, reply.RoundtripTime))
Else
MessageBox.Show(String.Format("Ping送信に失敗。({0})", reply.Status))
End If
End Using