If a computer is on a LAN and has a DNS server, the code below can be used to get its IP address from the web host. This code is very simple. Use the Dns class to connect to the DNS server on the Local Area Network. It then returns an IPHostEntry object as IPHost. IPHost contains properties including the IP Address... See image.
Derived from: http://www.codeproject.com/KB/IP/gtestdns.aspx