Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Visual Basic (Classic) FAQ


Find out the IP-number of your computer using winsock by Painkiller
Posted: 26 Oct 01

I use this method to find out the IP-adress of a computer instead of using an API.

Install the microsoft winsock 6.0 control in your project and drag it to your form. Place a textbox and commandbutton in your form.

use the following code:

Private Sub Command1_Click()
    Text1.Text = Winsock1.LocalIP
End Sub

You can also find out the name of your computer with the following code (with a second textbox):

Text2.Text = Winsock1.LocalHostName

Back to Visual Basic (Classic) FAQ Index
Back to Visual Basic (Classic) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close