Imports System.Net
Private Sub IPAddress()
'To get local address
Dim LocalHostName As String
Dim i As Integer
LocalHostName = Dns.GetHostName()
Dim IpAdd() As IPAddress = Dns.GetHostAddresses("experts-exchange.com")
For i = 0 To IpAdd.GetUpperBound(0)
If IpAdd(i).AddressFamily = Sockets.AddressFamily.InterNetwork Then
Me.Text = Me.Text + " " + IpAdd(i).ToString()
End If
Next
End Sub
|