VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Easly find out if the computer is online, and what its IP is with this easy bit of code! (uses Wins

by Sam Witney (7 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 20th December 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Easly find out if the computer is online, and what its IP is with this easy bit of code! (uses Winsock)

API Declarations


'Place a winsock control on the form, leave it named "winsock1".
'Add a command button, or timer, or whatever you wich to check the connection status.

Rate Easly find out if the computer is online, and what its IP is with this easy bit of code! (uses Wins




ipaddress = Winsock1.LocalIP
If ipaddress = "127.0.0.1" Then
    MsgBox "You are disconnected!"
Else
    MsgBox "You are online, and your IP is " & ipaddress
End If

Download this snippet    Add to My Saved Code

Easly find out if the computer is online, and what its IP is with this easy bit of code! (uses Wins Comments

No comments have been posted about Easly find out if the computer is online, and what its IP is with this easy bit of code! (uses Wins. Why not be the first to post a comment about Easly find out if the computer is online, and what its IP is with this easy bit of code! (uses Wins.

Post your comment

Subject:
Message:
0/1000 characters