factory909 Posted June 23, 2009 Posted June 23, 2009 I am trying to write just a simple application with VB2008, one form, 2 buttons, the 1st button gets the hostname, the 2nd button needs to get the ip address of the machine its ran on. the first button works. heres what I got for button 2:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim ip As String Dim resolve As Decimal ip = (Net.Dns.GetHostName) resolve = (Net.Dns.GetHostAddresses(ip)) MessageBox.Show(resolve) End Sub
factory909 Posted June 23, 2009 Author Posted June 23, 2009 nevermind i think i got it right.System.Net.Dns.GetHostEntry(ip).AddressList(0).ToString
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now