Ejemplo n.º 1
0
        public FormWebBrowser()
        {
            IEVersion.BrowserEmulationSet();

            InitializeComponent();
            initWebForm();
        }
Ejemplo n.º 2
0
        public FormWebBrowser(int width, int height, string path)
        {
            IEVersion.BrowserEmulationSet();

            InitializeComponent();
            //-------------------------
            try
            {
                this.webBrowser1.ObjectForScripting = this;//与c#代码通信,这句是关键
            }
            catch (Exception e)
            {
                string err = e.Message;
            }
            this.ClientSize = new System.Drawing.Size(width, height);
            this.webBrowser1.Navigate(path);
            this.TopMost = false;
            this.Hide();
        }