How to VB.Net Web Browser

The Web Browser control in VB.NET allows you to host Web pages and other web browser enabled documents in your Windows Forms applications. You can add browser control in your VB.Net projects and it displays the web pages like normal commercial web browsers . You can use the Browser control to add your existing Web based controls to your Windows Forms client applications.


The WebBrowser control has several properties, methods, and events related to navigation. The following VB.Net program displays a web page in browser window and also you can retrieve the source code of the same web page with another button click.

Imports System.IO
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim source As [String] = ("viewsource.txt")
        Dim writer As StreamWriter = File.CreateText(source)
        Process.Start("notepad.exe", source)
    End Sub
End Class (C) 2021    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About