Solved

VB.Net - Get IPAddress of User Computer

Posted on 2013-06-13
4
324 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.NET 2008 VB and C# 6 48
Expression Evaluater 3 46
RLDC Reporting in Visual studio 11 44
Iteration Help (Asp.net VB) 5 37
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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