Is trying to do something. It have to be followed by a catch or final. It can prevent exceptions and crash of your program, but using try/catch is taking huge memory, if you're using alot.
Code
If TextBox1.Text.Contains("http://") Then
Is Checking if the textbox is containing http://, if not, then it will convert it. The methode used here is really bad. It could have been done much simpler. With a simple string add.
Code
Dim iphe As IPHostEntry = Dns.GetHostEntry(TextBox1.Text.Replace("http://", String.Empty))
TextBox2.Text = iphe.AddressList(0).ToString()
Is making the variable iphe, which is the variable for IPHostEntry. It is simply getting the entry, which is the ipaddresslist. The first ip in the addresslist is the network ip (Correct me, if I'm wrong). Is writing the ip into a string and then into the textbox2.
Is just an else to the if code for checking, if the textbox contains http://
Code
Dim iphe As IPHostEntry = Dns.GetHostEntry(TextBox1.Text)
TextBox2.Text = iphe.AddressList(0).ToString()
Doing the same as the code above, but without http://. Reallt this is the worst ipcheck of websites I have seen.
Ending the check.
Code
Catch ex As Exception
Catching exception, if there was throwed any.
Writing the exception into a messagebox.
Ending the try.
Explained. Correct me, if I'm wrong.