System.Net.IPHostEntry iph = System.Net.Dns.GetHostEntry(Environment.MachineName); MessageBox.Show( iph.AddressList[0].ToString());