Note: if you’re not a beginner and just want to look for the code, you may skip these 1-6 steps and go straight to the sample code.

1) Let’s start with new project “Windows forms application”

2) Put one TextBox and a Button in the Form

3) Add reference to our project by clicking : Project –> Add Reference

4) Scroll down and select  “System.Net” as our reference. Click OK to proceed.

5) Open the Coding Window or you can just simply double click on the Button1, or you can also use F7 for shortcut.

6) Type “Imports System.Net” in General as shown in the picture below

7) Now the code part, on your Button1_Click event add this code as shown in the picture below

8) Run your program or press F5