Do somone have a code:
Button1 Click...etc..
check ip code
write IP in textbox 1
Printable View
Do somone have a code:
Button1 Click...etc..
check ip code
write IP in textbox 1
To get the local IPs, you can do something like this:
To get the external facing IDs, you will have to use a service out on the net. My example uses whatismyip.com, but make sure to read their automation page before you just start using their service.Code:Dim s As String = System.Net.Dns.GetHostName()
Dim IPEntry As IPHostEntry = System.Net.Dns.GetHostEntry(s)
Dim IPAdds As IPAddress() = IPEntry.AddressList
For Each IPAdd As IPAddress In IPAdds
TextBox1.Text &= IPAdd.ToString() & Environment.NewLine
Next
Code:Dim wc As New System.Net.WebClient()
Dim enc As New System.Text.ASCIIEncoding
TextBox1.Text = enc.GetString(wc.DownloadData("http://whatismyip.com/automation/n09230945.asp"))
Thx.. It helped and works :DQuote:
Originally Posted by Negative0