using winsock you can get the local ip by saying winsock1.LocalIP and the remote host ip by saying winsock1.RemoteHostIP . not sure if that is exactly what you wanted, but maybe it will help. one way to detect when your computer connects to the internet would be to have the winsock control attempt to connect to remote machine. if it is successful then you know you have an internet connection, if not you are not connected. and ghost, this topic is on vb.
"It's better to burn out, than to fade away."