protected frmGMDashboard() { InitializeComponent(); UpdateTabs(); this.TranslateWinForm(); frmInitative = new frmInitiative(); frmInitative.Hide(); VisibleChanged += frmGMDashboard_VisibleChanged; frmInitative.InitUC.CurrentCharacterChanged += InitUC_CurrentCharacterChanged; frmInitative.FormClosing += frmInitative_FormClosing; FormClosing += frmGMDashboard_FormClosing; frmInitative.TopMost = true; CenterToParent(); // auto hide the form at creation Hide(); }
protected frmGMDashboard() { InitializeComponent(); UpdateTabs(); LanguageManager.Instance.Load(GlobalOptions.Instance.Language, this); frmInitative = new frmInitiative(); frmInitative.Hide(); VisibleChanged += frmGMDashboard_VisibleChanged; frmInitative.InitUC.CurrentCharacterChanged += InitUC_CurrentCharacterChanged; frmInitative.FormClosing += frmInitative_FormClosing; FormClosing += frmGMDashboard_FormClosing; frmInitative.TopMost = true; CenterToParent(); // auto hide the form at creation Hide(); }
/* * When the user is attempting to close the initiative control, * simply "hide" it. */ void frmInitative_FormClosing(object sender, FormClosingEventArgs e) { frmInitative.Hide(); e.Cancel = true; }