Solved

VB.Net - Get IPAddress of User Computer

Posted on 2013-06-13
4
321 Views
Last Modified: 2013-06-13
Good Day Experts!

I have a little modification required for my application.  When the User performs and Add on one of the Tabs, I need to insert the IP Address of their computer into the record.

I have searched the net and am having trouble finding just the simple one IPAddress example.

Can you recommend a link to a how-to for this?

Thanks,
jimbo99999
0
Comment
Question by:Jimbo99999
  • 2
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39245019
Is this a web application, Forms app, or a console app?
0
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39245022
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

Open in new window


http://sourcecodemaster.com/vb-net/how-do-i-get-a-computers-name-and-ip-address-using-vb-net/
http://www.codeproject.com/Articles/13868/Get-the-client-s-IP-address-using-TcpClient-in-VB
0
 

Author Comment

by:Jimbo99999
ID: 39245052
It is a console app.
0
 

Author Closing Comment

by:Jimbo99999
ID: 39245944
Thanks for the help and the links. I have it working.  

Good day,
jimbo99999
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question