Solved

VB.Net - Get IPAddress of User Computer

Posted on 2013-06-13
4
319 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 74

Expert Comment

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

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
Comment Utility
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
Comment Utility
It is a console app.
0
 

Author Closing Comment

by:Jimbo99999
Comment Utility
Thanks for the help and the links. I have it working.  

Good day,
jimbo99999
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now