|
-
Nov 19th, 2002, 09:51 PM
#1
Thread Starter
Member
Get IP - quick question *RESOLVED*
Hey guys,
I cant seem to find the syntax in VB.NET to return my local IP address...
ie:
VB Code:
label1.Text = 'get my IP here
Any one know?
Thanks in advance fpr the help
Longy
Last edited by longshot_zero; Nov 20th, 2002 at 01:15 AM.
-
Nov 19th, 2002, 10:29 PM
#2
Thread Starter
Member
-
Nov 20th, 2002, 12:04 AM
#3
Frenzied Member
VB Code:
Dim ipHost As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName())
Dim ip As System.Net.IPAddress() = ipHost.AddressList
Label1.Text = ip(0).ToString()
You can also enumerate the ip array and get all the ip address thats asociated with your machine.
Hope that helped.
Last edited by DevGrp; Nov 20th, 2002 at 12:08 AM.
Dont gain the world and lose your soul
-
Nov 20th, 2002, 12:53 AM
#4
Thread Starter
Member
thanks man that helps alot...
although im still VERY confused about the whole sockets thing...
anyone got a VERY basic example or tutorial?
Thanks
longy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|