G
Guest
I have a Windows Forms .NET application. I need tolaunch an entire new
Windows Form2 (with its' own designer Form2.h [Design]) off of a button click
event handler from Form1. How can I do this ?
I think part of the answer invloves going to my project & doing :
Add > New Item > Windows Form
This adds the Form2.cpp & Form2.h & Form2.h [Design].
But I'm not sure on what to add in the Form1.h button click event handler.
Here's what I've tried :
System::Windows::Forms::Form* Form2 = new System::Windows::Forms::Form();
Form2->Show();
This does launch a new window, but it's not the Form2 I created in
[Designer] - in effect, I've created two Form2's ...
Should I use :
Application::Run (new Form2()); ??
Any help would be appreciated - I'm stuck on this issue.
I can send the source code if it would help.
Regards,
ak
Windows Form2 (with its' own designer Form2.h [Design]) off of a button click
event handler from Form1. How can I do this ?
I think part of the answer invloves going to my project & doing :
Add > New Item > Windows Form
This adds the Form2.cpp & Form2.h & Form2.h [Design].
But I'm not sure on what to add in the Form1.h button click event handler.
Here's what I've tried :
System::Windows::Forms::Form* Form2 = new System::Windows::Forms::Form();
Form2->Show();
This does launch a new window, but it's not the Form2 I created in
[Designer] - in effect, I've created two Form2's ...
Should I use :
Application::Run (new Form2()); ??
Any help would be appreciated - I'm stuck on this issue.
I can send the source code if it would help.
Regards,
ak