Beispiel #1
0
 private void menu_btn_Click(object sender, EventArgs e)
 {
     if (menuPage == null)
     {
         menuPage             = new admenuPage();    //Create form if not created
         menuPage.FormClosed += menuPage_FormClosed; //Add eventhandler to cleanup after form closes
         InitializeComponent();
         menuPage.Show(this);                        //Show Form assigning this form as the forms owner
     }
 }
Beispiel #2
0
 void menuPage_FormClosed(object sender, FormClosedEventArgs e)
 {
     menuPage = null;
     Show();
 }