Solved

Obtaining an IP Address through VB

Posted on 2002-04-20
2
204 Views
Last Modified: 2013-11-13
I'm doing a uni project and I need to know how to get VB to return my systems IP Address to my application so that it can be encrypted.  The IP address could either be displayed automatically or through clicking a button?
0
Comment
Question by:balabaster
2 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6956791
Take a look at the following links:
Determining the Local IP Address for the Installed Adapter
http://www.mvps.org/vbnet/index.html?code/network/getadaptersinfo-localipaddresses.htm

Determining All Local IP Addresses for All Installed Adapters
http://www.mvps.org/vbnet/index.html?code/network/getadaptersinfo-localipaddresses.htm

Anthony
0
 
LVL 4

Accepted Solution

by:
RichW earned 150 total points
ID: 6957683
Place a Winsock control and a Textbox on your form.

This will list the IP address.

Private Sub Form_Load()
  Text1 = Me.Winsock1.LocalIP
End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

920 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

13 Experts available now in Live!

Get 1:1 Help Now