Table of Contents
With Windows Forms Project

For .NET Framework

Follow these steps to use EO.WebBrowser in a Windows Form application for .NET Frameworks in Visual Studio:

  1. Open a Form in design view;
  2. Select View -> Toolbox from the main menu to display the toolbox;
  3. Expand "EO.WebBrowser" tab. If you do not see this tab, follow these steps to add it:
    1. Right click in a blank area of the toolbox and click Add Tab, then type "EO.WebBrowser" as the name of the new tab;
    2. From the Tools menu, choose Add/Remove Toolbox Items (or Choose Items). The Customize Toolbox dialog opens;
    3. Click Browse to open the browse dialog, locate and select EO.WebBrowser.dll and EO.WebBrowser.WinForm.dll from the installation folder (by default in "Program Files\Essential Objects\EO.Total 20xx", or "Program Files (x86)\Essential Objects\EO.Total 20xx" on 64 bit system, where 20xx is the version number);
    4. Make sure "WebControl" and "WebView" are checked in the list. Note that the namespace for "WebControl" should be "EO.WinForm" and the namespace for "WebView" should be "EO.WebBrowser";
    5. Click OK to close the dialog. Control "WebControl" should appear in the toolbox under "EO.WebBrowser" tab;
  4. Drag "WebControl" from the toolbox into your form. It should create the control in your form and adding a new WebView component to your form at the same time;

After the above steps, you can use the newly added WebView component in your code directly. For example:

//Load Google's homepage into the WebView
WebView1.Url = "www.google.com";

You can also use the Property Window to set the WebView's property or handling its events.

For .NET Core

Toolbox integration for EO.WebBrowser does not work for .NET Core because the DLLs are built against .NET Framework. However the DLLs are fully tested with .NET Core. In order to use EO.WebBrowser with .NET Core Windows.Forms application, you must create the control explicitly through code. The following code demonstrates how to create a WebControl to fill the entire form:

public partial class Form1 : Form
{
    //Explicitly declares WebControl and WebView objects
    private EO.WinForm.WebControl webControl1;
    private EO.WebBrowser.WebView webView1;

    public Form1()
    {
        InitializeComponent();

        //Creates and initializes the WebControl and WebView object
        webControl1 = new EO.WinForm.WebControl();
        webView1 = new EO.WebBrowser.WebView();
        webControl1.Dock = DockStyle.Fill;
        webControl1.WebView = webView1;
        webView1.Url = "http://www.google.com";
        Controls.Add(webControl1);
    }
}