{"id":7193,"date":"2015-09-05T17:08:03","date_gmt":"2015-09-05T09:08:03","guid":{"rendered":"http:\/\/www.vbtutor.net\/?page_id=7193"},"modified":"2018-06-22T19:50:21","modified_gmt":"2018-06-22T11:50:21","slug":"visual-basic-2015-lesson-23creating-web-browser","status":"publish","type":"page","link":"https:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-23creating-web-browser\/","title":{"rendered":"Visual Basic 2015 Lesson 23:Creating a Web Browser"},"content":{"rendered":"<h4 style=\"text-align: center;\"><a href=\"http:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-22-working-radio-buttons\/\">[Lesson 22] <\/a>&lt;&lt; <a href=\"http:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-tutorial\/\">[Contents]<\/a> &gt;&gt; <a href=\"http:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-24-handling-errors\/\">[Lesson 24]<\/a><\/h4>\n<p>Which browser do you use to surf the Internet? Basically, everyone likes to navigate the Internet using Google Chrome, Internet Explorer, FireFox, Safari, Opera and more. However, isn\u2019t it cool if you can create your very own web browser that you can customize to your own taste? Yes, you can do that in Visual Basic 2015, and pretty easy too. In this lesson, we shall learn how to create a simple web browser and get it running in a few minutes.<\/p>\n<p>First of all, start a new project in Visual Basic 2015 and name it with any names you like, we are using the name MyWebBrowser. Change the size of Form1 to 800,600 in its properties window. Next, you need to add an engine so that your web browser can connect to the Internet, and this very engine is the WebBrowser control, located on the Toolbox on the left side, set its size property to 600,400 and change its name to \u00a0MyWebBrowser\u00a0.<br \/>\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\" style=\"display: block; text-align: center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-3033628290023372\" data-ad-slot=\"4768455349\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><br \/>\nThe next step is to insert a text box and place it at the top of the WebBrowser control, this will be served as the address bar where the user can enter the URL. Next, place a button beside the text box and change its text as GO and change its name to BtnGo. Finally, add a few more buttons and change their texts to Home, Back, Forward, Refresh and Search respectively.The WebBrowser control comprises various methods like GoHome, GoBack, GoForward, Search, Refresh, Navigate and more. They can be used to write event-driven procedures for the various navigation buttons we place on the web browser.<\/p>\n<p>For the Navigate method, \u00a0we need to use the following syntax:<\/p>\n<pre><strong>WebBrowser.Navigate(URL)<\/strong><\/pre>\n<p><strong>The Code<\/strong><\/p>\n<pre style=\"font-size: 110%;\">Private Sub BtnGO_Click(sender As Object, e As EventArgs) Handles BtnGO.Click\r\nMyWebBrowser.Navigate(TxtURL.Text)\r\nEnd Sub\r\n\r\nPrivate Sub BtnSearch_Click(sender As Object, e As EventArgs) Handles BtnSearch.Click\r\nMyWebBrowser.GoSearch()\r\nEnd Sub\r\n\r\nPrivate Sub BtnHome_Click(sender As Object, e As EventArgs) Handles BtnHome.Click\r\nMyWebBrowser.GoHome()\r\nEnd Sub\r\n\r\nPrivate Sub BtnBack_Click(sender As Object, e As EventArgs) Handles BtnBack.Click\r\nMyWebBrowser.GoBack()\r\nEnd Sub\r\n\r\nPrivate Sub BtnForward_Click(sender As Object, e As EventArgs) Handles Button1.Click\r\nMyWebBrowser.GoForward()\r\nEnd Sub\r\n\r\nPrivate Sub BtnRefresh_Click(sender As Object, e As EventArgs) Handles BtnRefresh.Click\r\nMyWebBrowser.Refresh()\r\nEnd Sub\r\n<\/pre>\n<p><strong>The Browser Interface<\/strong><\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4843\" src=\"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg\" alt=\"vb2013_figure23.1\" width=\"800\" height=\"600\" \/><\/a><strong>Figure 23.1<\/strong><\/p>\n<p><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"autorelaxed\"\n     data-ad-client=\"ca-pub-3033628290023372\"\n     data-ad-slot=\"5090773108\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h2 style=\"text-align: center;\">\u00a0<a href=\"http:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-22-working-radio-buttons\/\">[Lesson 22]\u00a0<\/a>&lt;&lt;\u00a0<a href=\"http:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-tutorial\/\">[Contents]<\/a>\u00a0&gt;&gt; <a href=\"http:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-24-handling-errors\/\">[Lesson 24]<\/a><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>[Lesson 22] &lt;&lt; [Contents] &gt;&gt; [Lesson 24] Which browser do you use to surf the Internet? Basically, everyone likes to navigate the Internet using Google Chrome, Internet Explorer, FireFox, Safari, Opera and more. However, isn\u2019t it cool if you can create your very own web browser that you can customize to your own taste? Yes, &hellip; <a href=\"https:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-23creating-web-browser\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Visual Basic 2015 Lesson 23:Creating a Web Browser<\/span><\/a><\/p>\n","protected":false},"author":23013,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-7193","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Visual Basic 2015 Lesson 23:Creating a Web Browser - Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB<\/title>\n<meta name=\"description\" content=\"This article describes how to create a web browser in Visual Basic 2015\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Visual Basic 2015 Lesson 23:Creating a Web Browser - Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB\" \/>\n<meta property=\"og:description\" content=\"This article describes how to create a web browser in Visual Basic 2015\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html\" \/>\n<meta property=\"og:site_name\" content=\"Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Vbtutor\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-22T11:50:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@liewvk\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-23creating-web-browser\/\",\"url\":\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html\",\"name\":\"Visual Basic 2015 Lesson 23:Creating a Web Browser - Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB\",\"isPartOf\":{\"@id\":\"https:\/\/www.vbtutor.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg\",\"datePublished\":\"2015-09-05T09:08:03+00:00\",\"dateModified\":\"2018-06-22T11:50:21+00:00\",\"description\":\"This article describes how to create a web browser in Visual Basic 2015\",\"breadcrumb\":{\"@id\":\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#primaryimage\",\"url\":\"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg\",\"contentUrl\":\"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg\",\"width\":800,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vbtutor.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Visual Basic 2015 Lesson 23:Creating a Web Browser\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vbtutor.net\/#website\",\"url\":\"https:\/\/www.vbtutor.net\/\",\"name\":\"Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB\",\"description\":\"Start learning Visual Basic from beginner to advanced. Includes VB.NET, VBA, and classic VB tutorials for students and professionals.\",\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Visual Basic 2015 Lesson 23:Creating a Web Browser - Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB","description":"This article describes how to create a web browser in Visual Basic 2015","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html","og_locale":"en_US","og_type":"article","og_title":"Visual Basic 2015 Lesson 23:Creating a Web Browser - Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB","og_description":"This article describes how to create a web browser in Visual Basic 2015","og_url":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html","og_site_name":"Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB","article_publisher":"https:\/\/www.facebook.com\/Vbtutor","article_modified_time":"2018-06-22T11:50:21+00:00","og_image":[{"url":"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@liewvk","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vbtutor.net\/index.php\/visual-basic-2015-lesson-23creating-web-browser\/","url":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html","name":"Visual Basic 2015 Lesson 23:Creating a Web Browser - Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB","isPartOf":{"@id":"https:\/\/www.vbtutor.net\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#primaryimage"},"image":{"@id":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#primaryimage"},"thumbnailUrl":"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg","datePublished":"2015-09-05T09:08:03+00:00","dateModified":"2018-06-22T11:50:21+00:00","description":"This article describes how to create a web browser in Visual Basic 2015","breadcrumb":{"@id":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#primaryimage","url":"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg","contentUrl":"https:\/\/www.vbtutor.net\/wordpress\/wp-content\/uploads\/2014\/01\/vb2013_figure23.1.jpg","width":800,"height":600},{"@type":"BreadcrumbList","@id":"http:\/\/www.vbtutor.net\/vb2015\/vb2015_lesson23.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vbtutor.net\/"},{"@type":"ListItem","position":2,"name":"Visual Basic 2015 Lesson 23:Creating a Web Browser"}]},{"@type":"WebSite","@id":"https:\/\/www.vbtutor.net\/#website","url":"https:\/\/www.vbtutor.net\/","name":"Learn Visual Basic Programming \u2013 VB.NET, VBA &amp; Classic VB","description":"Start learning Visual Basic from beginner to advanced. Includes VB.NET, VBA, and classic VB tutorials for students and professionals.","inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/pages\/7193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/users\/23013"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/comments?post=7193"}],"version-history":[{"count":23,"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/pages\/7193\/revisions"}],"predecessor-version":[{"id":13039,"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/pages\/7193\/revisions\/13039"}],"wp:attachment":[{"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/media?parent=7193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/categories?post=7193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vbtutor.net\/index.php\/wp-json\/wp\/v2\/tags?post=7193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}