How to develop a Simple Web Browser Applicationin in C#.NET

Rate this article
5.00 out of 5
Developing a custom web browser is a common task in every bodies programming career. He or she sometimes needs to develop a simple browser to more complicated custom browsers which needs can be used as part of a games application etc. In this video tutorial, I will show you how to develop a simple browser in C#.NET. This can be used as a starting point to develop sophisticated browser applications based on customer requirements. 

Watch the YouTube Video tutorial from the link below

Source Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SimpleBrowser
    public partial class FormSimpleBrowser : Form
        public FormSimpleBrowser()

        private void toolStripButtonGo_Click(object sender, EventArgs e)
            toolStripLabelStatus.Text = "Navigating to " + toolStripComboBoxURL.Text + " Please wait..";

        private void webBrowserCtrl_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
            toolStripLabelStatus.Text = "Done..";

namespace SimpleBrowser
    partial class FormSimpleBrowser
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
            if (disposing && (components != null))

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormSimpleBrowser));
            this.webBrowserCtrl = new System.Windows.Forms.WebBrowser();
            this.toolStripStatus = new System.Windows.Forms.ToolStrip();
            this.toolStripComboBoxURL = new System.Windows.Forms.ToolStripComboBox();
            this.toolStripButtonGo = new System.Windows.Forms.ToolStripButton();
            this.toolStripLabelStatus = new System.Windows.Forms.ToolStripLabel();
            this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
            // webBrowserCtrl
            this.webBrowserCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
            this.webBrowserCtrl.Location = new System.Drawing.Point(0, 0);
            this.webBrowserCtrl.MinimumSize = new System.Drawing.Size(20, 20);
            this.webBrowserCtrl.Name = "webBrowserCtrl";
            this.webBrowserCtrl.Size = new System.Drawing.Size(652, 341);
            this.webBrowserCtrl.TabIndex = 0;
            this.webBrowserCtrl.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowserCtrl_DocumentCompleted);
            // toolStripStatus
            this.toolStripStatus.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripStatus.Location = new System.Drawing.Point(0, 0);
            this.toolStripStatus.Name = "toolStripStatus";
            this.toolStripStatus.Size = new System.Drawing.Size(652, 25);
            this.toolStripStatus.TabIndex = 1;
            this.toolStripStatus.Text = "Status";
            // toolStripComboBoxURL
            this.toolStripComboBoxURL.AutoCompleteCustomSource.AddRange(new string[] {
            this.toolStripComboBoxURL.Items.AddRange(new object[] {
            this.toolStripComboBoxURL.Name = "toolStripComboBoxURL";
            this.toolStripComboBoxURL.Size = new System.Drawing.Size(300, 25);
            // toolStripButtonGo
            this.toolStripButtonGo.BackColor = System.Drawing.SystemColors.ActiveCaption;
            this.toolStripButtonGo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
            this.toolStripButtonGo.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
            this.toolStripButtonGo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonGo.Image")));
            this.toolStripButtonGo.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonGo.Name = "toolStripButtonGo";
            this.toolStripButtonGo.Size = new System.Drawing.Size(27, 22);
            this.toolStripButtonGo.Text = "Go";
            this.toolStripButtonGo.ToolTipText = "Go..";
            this.toolStripButtonGo.Click += new System.EventHandler(this.toolStripButtonGo_Click);
            // toolStripLabelStatus
            this.toolStripLabelStatus.ForeColor = System.Drawing.Color.ForestGreen;
            this.toolStripLabelStatus.Name = "toolStripLabelStatus";
            this.toolStripLabelStatus.Size = new System.Drawing.Size(39, 22);
            this.toolStripLabelStatus.Text = "Status";
            // toolStripLabel1
            this.toolStripLabel1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
            this.toolStripLabel1.Name = "toolStripLabel1";
            this.toolStripLabel1.Size = new System.Drawing.Size(85, 22);
            this.toolStripLabel1.Text = "Go to website";
            // FormSimpleBrowser
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(652, 341);
            this.Name = "FormSimpleBrowser";
            this.Text = "Simple Web Browser";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;



        private System.Windows.Forms.WebBrowser webBrowserCtrl;
        private System.Windows.Forms.ToolStrip toolStripStatus;
        private System.Windows.Forms.ToolStripComboBox toolStripComboBoxURL;
        private System.Windows.Forms.ToolStripButton toolStripButtonGo;
        private System.Windows.Forms.ToolStripLabel toolStripLabelStatus;
        private System.Windows.Forms.ToolStripLabel toolStripLabel1;

Download Source Code

Author :
Tom Thomas
Joined Date :12-Aug-2011
Mr. Tom is the Co-Founder and CTO of  KTS InfoTech.  He started his career as a C/C++ programmer in the late 90's and has been very active and passionate in programming since then. He had worked both in start-ups ( Infortech software Pvt Ltd) as well as in CMM Level 5 companies (NeST and Wipro Technologies) for clients like General Electric, Agilent, Hitachi, Toshiba, Fujitsu, Alcatel, Insurance Service Corporation etc. His experience as an Engineer, Architect, Project Manager, Chief Technical Officer and as a Teacher makes him ideal for any type of jobs related to Information Technology.

His role with his present employer includes exploring new business opportunities and partnerships, Developing software product frameworks, developing and executing marketing strategies for company products etc.  

He holds Masters degree in Physics and Computer Science form CUSAT , one of the premier Science and Technology Institutions in India .

His major interests are in Optical Networking, Robotics, Device drivers, Database, Graphics, web applications, Software product Engineering, Open source Technologies and Sports physics.

He resides in Kerala ,India, with his mother, wife and his little angel.

He can be reached on Skype at this ID thomas_tom99 or at his E Mail address tom.thomas (at)


Post Your Comments
Name (Max 50 Chars)

Academic Projects

Site optimized for IE7, 1280 X 768 and above. Copyright © 2010 - 2018 KTS InfoTech
Site Developed Using KTS WebCloud