Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.Net - Get IPAddress of User Computer

Posted on 2013-06-13
4
Medium Priority
?
329 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 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