Open a Form within a Form
If you are using C++ and through a button event want to open another form that you have created. How do you code a scenario like this.
My project is called "Fonster".
In this project I have made 2 Forms named "Form1" and "ResultReport".
In Form1 I have made a button. When I press this button I want the Form "ResultReport" to open.
What should I write between the {}:
I am trying something like this but it doesn´t work. It has to be some other things to do also.
Perheps I have to declare the Form ResultReport ? This is the first time I am doing this thing.
When I run the code, the compiler
says that ResultReport must point to a class/struct/union/generic type.
Code:
private: System::Void OpenForm_Click(System::Object^ sender, System::EventArgs^ e)
{
ResultReport->Show();
}