Strg + F4 schliesst MDI Fenster

In Winforms Applikation: Durch Drücken von Strg+F4 (Ctrl+F4) soll das aktuelle MDI Child Fenster geschlossen werden. //In Verbindung mit Infragistics UltraTabbedMdiManager... if (ultraTabbedMdiManager1.ActiveTab != null ) { if (form1 != null && ultraTabbedMdiManager1.ActiveTab.Form == form1 ) { form1 .Close(); } else if (form2!= null && ultraTabbedMdiManager1.ActiveTab.Form == form2) { form2.Close(); } else { // false } // Ohne Infragistics Komponenten if(this.ActiveMdiChild.Name =="form1") { Form1 form1 = (Form1)this.ActiveMdiChild; form1.Close(); } else { Form2 form2 = (Form2)this.ActiveMdiChild; form2.Close(); }

Latest Posts

Popular Posts