|
-
Jan 17th, 2002, 02:01 PM
#1
Thread Starter
Lively Member
ip address
I don't know if I am asking in the right place, but I need to find my IP address within my program. You see, it is dynamic, and when my program starts, I want to put it into a text box. Any help?
-
Jan 17th, 2002, 02:11 PM
#2
New Member
the easiest way to go on this one is to use the Winsock control that comes with Vb. Check it the components list.
and then there is a property called localip or localadress or something..
ex. winsock.localaddress
if u got multiple IPs this will be a problem. Then u´ll have to go thru the WinsockAPI or a more advanced control.
good luck
-
Jan 17th, 2002, 02:49 PM
#3
VB Code:
Text1.Text = Winsock1.LocalIP
-
Jan 17th, 2002, 02:50 PM
#4
Fanatic Member
After adding the winsock component:
Code:
Private Sub Form_Load()
Text1.Text = Winsock1.LocalIP
End Sub
"I have not failed. I've just found 10,000 ways that won't work."
'Thomas Edison'
"If we knew what it was we were doing it wouldn't be called research, would it?"
'Albert Einstein'
VB6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|