This example illustrates how to get the machine name from an IP address using a reverse DNS lookup.

Imports System
Imports System.Net

Public Class Form1

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim arr() As String
Dim WS As String = “”

Dim addr As IPAddress = IPAddress.Parse(“”)
Dim entry As IPHostEntry = Dns.GetHostEntry(addr)

arr = Split(entry.HostName, “.”)
WS = arr(0)

End Sub
End Class