How do I make vb2008 find my ip address
IP address
Collapse
X
-
Get the hostname then pass the hostname to GetHostByName which provides an AddressList collection. From this collection, you reference the 0 index which is the first IP address representing your PC.Originally posted by radomHow do I make vb2008 find my ip address
Example culled from search results:
Code:Private Sub GetIPAddress() Dim strHostName As String Dim strIPAddress As String strHostName = System.Net.Dns.GetHostName() strIPAddress = System.Net.Dns.GetHostByName(strHostName).AddressList(0).ToString() MessageBox.Show("Host Name: " & strHostName & "; IP Address: " & strIPAddress) End Sub -
please post the gerberish if you like.Originally posted by radomI got it to work but i get a bunch of gerberish
i think you might have new ipv6 addresses which are hexidecimal format.Comment
Comment