Opening and Closeing Additional forms

Mar 14 2004 7:02 AM
I have a small project that includes two windows forms. Form1 is the frmLogin form and Form2 is the frmMainDisplay. I need my button click event (situated on my frmLoging form) to contain code that will unload/close the frmLoging then show the frmMainDisplay. I have the following code in the button click but it seems to close everything: [code] this.Close(); frmMyDiaryEdit newForm = new frmMyDiaryEdit(); newForm.Show(); [/code] Also Tried: [code] frmMainDisplay newForm = new frmMainDisplay (); newForm.Show(); this.Close(); [/code] Where am I going wrong? All i want to do is Click a button on frmLoging so that it opens frmMainDisplay then Close frmLoging