if (instance.NavigateError += new SHDocVw.DWebBrowserEvents2_NavigateErrorEventHandler(instance_NavigateError))
private void button6_Click(object sender, EventArgs e) { SHDocVw.WebBrowser instance = (SHDocVw.WebBrowser)webBrowser1.ActiveXInstance; webBrowser1.Navigate("http://www.g4ogle.com/"); instance.NavigateError += new SHDocVw.DWebBrowserEvents2_NavigateErrorEventHandler(instance_NavigateError); string asj = instance.StatusBar.GetType().ToString(); } void instance_NavigateError(object pDisp, ref object URL, ref object Frame, ref object StatusCode, ref bool Cancel) { string filename = textBox1.Text; string fileName = filename.Substring(0, filename.LastIndexOf(("."))); fileName += ".txt"; if (File.Exists(fileName)) { File.Delete(fileName); } // string asg = Ret[0].ToString(); int name = Convert.ToInt32(StatusCode); //ret1.Add("----" + "The URL '" + url + "' is Not valid."); // MessageBox.Show("error on page"); Ret.Add("----" + "The URL '" + URL + "' is Not valid."); //File.AppendAllLines(fileName, Ret); MessageBox.Show("Completed......", "Info Box", MessageBoxButtons.OK, MessageBoxIcon.Information); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)