fairose
December 15th, 2006, 01:51 AM
I have created a form with the menustrip with the options file followed by a open. So when the open is clicked it will open again the form without showing the previously opened form. Here is the code i haf done. Where am i do add in the code? Thanks.
Form1^ newForm = gcnew Form1();
newForm->ShowDialog();
Pls Thanks
stefboerrigter
December 19th, 2006, 07:41 AM
I have created a form with the menustrip with the options file followed by a open. So when the open is clicked it will open again the form without showing the previously opened form. Here is the code i haf done. Where am i do add in the code? Thanks.
Form1^ newForm = gcnew Form1();
newForm->ShowDialog();
Pls Thanks
You've got it correct.. the code you have there you just add that to the action of the button.
to unshow it:
Form1^ newForm = gcnew Form1();
currentForm->Visible = false; //visibility of the curret form is disabled (rename currentForm to the name of your form of course;)
newForm->ShowDialog();