private void HtmlBrowserInvoker(object sender, EventArgs e) { HtmlTextResultEventArgs args = (HtmlTextResultEventArgs)e; HtmlPrintForm printForm = new HtmlPrintForm(); // printForm.PluginMenus = this.mn; // printForm.HtmlResponseViewEvent += new HtmlResponseViewEventHandler(Report_HtmlResponseViewEvent); // printForm.ApplyToolbarSettingsEvent += new ApplyToolbarSettingsEventHandler(Report_ApplyToolbarSettingsEvent); // printForm.ApplyMenuSettingsEvent += new ApplyMenuSettingsEventHandler(Report_ApplyMenuSettingsEvent); try { if ( args.Append ) { printForm.AppendData(args.HtmlText, false); } else { printForm.AppendData(args.HtmlText, true); } printForm.UpdateSavePrintReportMenu(true); AddWorkspace(printForm, "Display Results"); } catch (Exception ex) { printForm.UpdateSavePrintReportMenu(false); MessageBox.Show(ex.Message,"Ecyware GreenBlue Inspector",MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void web_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e) { // Create browser HtmlPrintForm htmlForm = new HtmlPrintForm(true); htmlForm.web.RegisterAsBrowser = false; e.ppDisp = htmlForm.web.Application; htmlForm.web.Visible = true; this.HtmlResponseViewEvent(this, htmlForm); }