منبع:https://barnamenevis.org/showpo...6&postcount=18


Imports System.Net.NetworkInformation

Dim remoteMachineNameOrIP As String = "127.0.0.1"
Dim timeOut As Integer = 5
Dim ping As Ping = New Ping()
'// Pinging remote maching
Dim reply As PingReply = ping.Send(remoteMachineNameOrIP, timeOut)
'// Displaying the result
Dim sb As StringBuilder = New StringBuilder()
sb.Append("Address:" + reply.Address.ToString())
sb.Append("\nStatus:" + reply.Status.ToString())
sb.Append("\nRoundtripTime:" + reply.RoundtripTime.ToString())
MessageBox.Show(sb.ToString(), "Ping Result: " + remoteMachineNameOrIP)