Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP Address

Status
Not open for further replies.

4dd

Programmer
May 6, 2003
3
US
Does anyone know how to get IP Address of a pc using VB?

thanks
 
An easy way would be to add a winsock control and then code in,

Text1(or whatever) = Winsock1.LocalIP

Thanks and Good Luck!

zemp
 
Can you pls tell me how to add this control.
I looked under references as well as components.

any idea

thanks a lot
 
Make sure that you have SP5 installed. Under the Project menu select components (Ctrl-T). Scroll untill you find 'Microsoft Winsock Control 6.0 (SP5)'. Select it with the corresponding check box and click apply. It should now appear in your toolbox. Select it and draw it on a form.

Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top