//Override of Oath Tool Strip Menu Item Handler public override void oathToolStripMenuItem_Click(object sender, EventArgs e) { OathDialog oathDlg = new OathDialog(); oathDlg.Owner = this; try { oathDlg.Show(); } catch { throw new NotSupportedException("Oath Dialog not supported"); } }
private void oathToolStripMenuItem_Click(object sender, EventArgs e) { OathDialog dlg = new OathDialog(); foreach (Form fm in Application.OpenForms) { if (fm.Name == "OathDialog") { return; } } dlg.Owner = this; dlg.StartPosition = FormStartPosition.Manual; dlg.SetDesktopLocation((this.DesktopLocation.X - dlg.Width), this.DesktopLocation.Y); dlg.Show(); }