private void ButWinErrorH_Click(object sender, EventArgs e) { WinErrorInfo wei; try { wei = new WinErrorInfo(); } catch (Exception excp) { MessageBox.Show(this, excp.Message, "Windows Error Information", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } FormErrorList frm = new FormErrorList(wei); frm.ShowDialog(this); frm.Dispose(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); WinErrorInfo wei; try { wei = new WinErrorInfo(); } catch (Exception excp) { MessageBox.Show(excp.Message, "Windows Error Information", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } FormErrorList frm = new FormErrorList(wei); Application.Run(frm); }