vb.net ping
Function ping(ByVal IP As String) As String
If My.Computer.Network.Ping(IP) Then
MessageBox.Show("ok")
Else
MessageBox.Show("ng")
End If
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ping("ip位置")
End Sub