using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using mshtml;namespace BHOBrowser
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.axWebBrowser1.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler(axWebBrowser1_DocumentComplete);
        }        void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
        {
            IntPtr hwnd = this.axWebBrowser1.HWND;//抛出对 COM 组件的调用返回了错误 HRESULT E_F异常。
                                                  //还有axWebBrowser1.StatusText也抛出同样的异常。
        }
        
        private void Form1_Load(object sender, EventArgs e)
        {
            this.axWebBrowser1.Navigate("www.google.com.hk");
        }
        
    }
}