Net.Dns.GetHostName() strIPAddress = System.Net.Dns.GetHostEntry( strHostName).AddressList(0).
stackoverflow.com