.

browser in visual studio c#

reference:

AxInterop.SHDocVw
Interop.SHDocVw

 

 

class UI
    {
        public static void DisplayDataInBrowser(string result)
        {
            //display page
            webbrowser wbwin = new webbrowser();
            //wbwin.Browser.Navigate(href);
            wbwin.Browser.DocumentText = result;
            wbwin.Browser.ScriptErrorsSuppressed = true;
            wbwin.ShowDialog();
            ;
        }

    }

 

 

 

 

    public partial class webbrowser : Form
public partial class webbrowser : Form
{
    public webbrowser()
    {
        InitializeComponent();
    }

    public WebBrowser Browser
    {
        get { return axWebBrowser1; }
    }
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(webbrowser));
this.axWebBrowser1 = new WebBrowser();
this.SuspendLayout();
//
// axWebBrowser1
//
this.axWebBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.axWebBrowser1.Location = new System.Drawing.Point(0, 0);
//this.axWebBrowser1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWebBrowser1.OcxState")));
this.axWebBrowser1.Size = new System.Drawing.Size(416, 360);
this.axWebBrowser1.TabIndex = 0;

}

What's your thoughts on this?

*

Protected by WP Anti Spam