use
TextBox1.Text = myIP[0].ToString();
as
try
{
string sHostName = textBox1.Text;
System.Net.IPHostEntry ipE = System.Net.Dns.GetHostEntry(sHostName);
System.Net.IPAddress[] IpA = ipE.AddressList;
textBox2.Text = IpA[0].ToString();
}
catch(Exception ex)
{
textBox2.Text = ex.ToString();
}