Jump to content

GetHostAddress


Recommended Posts

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

Link to comment
Share on other sites


  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...