{"id":148,"date":"2010-02-16T10:28:30","date_gmt":"2010-02-16T09:28:30","guid":{"rendered":"http:\/\/blog.rabihtawil.com\/?p=148"},"modified":"2010-02-16T10:28:30","modified_gmt":"2010-02-16T09:28:30","slug":"getting-ip-address-vb-net-2008","status":"publish","type":"post","link":"http:\/\/www.raytawil.com\/?p=148","title":{"rendered":"Getting IP Address (VB NET 2008)"},"content":{"rendered":"<p><span style=\"text-decoration: underline;\"><strong>Note<\/strong><\/span><span style=\"color: #000000;\">: if  you&#8217;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.<\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>1) <\/strong><\/span>Let&#8217;s start with new project &#8220;Windows forms  application&#8221;<\/p>\n<p align=\"center\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/i932.photobucket.com\/albums\/ad167\/akangcupez\/1-2.jpg\" alt=\"\" width=\"320\" height=\"217\" \/><\/p>\n<p align=\"center\">\n<p align=\"left\"><span style=\"font-size: medium;\"><strong>2) <\/strong><\/span>Put one TextBox and a Button in the Form<\/p>\n<p align=\"center\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/i932.photobucket.com\/albums\/ad167\/akangcupez\/2-2.jpg\" alt=\"\" width=\"223\" height=\"133\" \/><\/p>\n<p align=\"center\">\n<p align=\"left\"><span style=\"font-size: medium;\"><strong>3)<\/strong><\/span> Add reference to our project by clicking :  Project &#8211;&gt; Add Reference<\/p>\n<p align=\"center\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/i932.photobucket.com\/albums\/ad167\/akangcupez\/4-2.jpg\" alt=\"\" width=\"195\" height=\"216\" \/><\/p>\n<p align=\"center\">\n<p align=\"left\"><span style=\"font-size: medium;\"><strong>4)<\/strong><\/span> Scroll down and select\u00a0 &#8220;System.Net&#8221; as our  reference. Click OK to proceed.<\/p>\n<p align=\"center\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/i932.photobucket.com\/albums\/ad167\/akangcupez\/5-2.jpg\" alt=\"\" width=\"317\" height=\"267\" \/><\/p>\n<p align=\"center\">\n<p align=\"left\"><span style=\"font-size: medium;\"><strong>5)<\/strong><\/span> Open the Coding Window or you can just simply  double click on the Button1, or you can also use F7 for shortcut.<\/p>\n<p align=\"center\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/i932.photobucket.com\/albums\/ad167\/akangcupez\/3-2.jpg\" alt=\"\" width=\"355\" height=\"121\" \/><\/p>\n<p align=\"center\">\n<p align=\"left\"><span style=\"font-size: medium;\"><strong>6)<\/strong><\/span> Type &#8220;Imports System.Net&#8221; in General as shown  in the picture below<\/p>\n<p align=\"center\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/i932.photobucket.com\/albums\/ad167\/akangcupez\/6-2.jpg\" alt=\"\" width=\"389\" height=\"152\" \/><\/p>\n<p align=\"center\">\n<p align=\"left\"><span style=\"font-size: medium;\"><strong>7)<\/strong><\/span> Now the code part, on your Button1_Click  event add this code as shown in the picture below<\/p>\n<p align=\"center\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/i932.photobucket.com\/albums\/ad167\/akangcupez\/7-2.jpg\" alt=\"\" width=\"404\" height=\"188\" \/><\/p>\n<p align=\"left\"><span style=\"font-size: medium;\"><strong>8)<\/strong><\/span> Run your program or press F5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: if you&#8217;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&#8217;s start with new project &#8220;Windows forms application&#8221; 2) Put one TextBox and a Button in the Form 3) Add reference to our project by clicking : [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[110],"tags":[49,87],"_links":{"self":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts\/148"}],"collection":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=148"}],"version-history":[{"count":1,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":372,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts\/148\/revisions\/372"}],"wp:attachment":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}