Adding new form and loading it

  • Thread starter Thread starter H.B.
  • Start date Start date
H

H.B.

Hi,

I need advice or code sample on how to load a new form from my main form in
a Managed C++ project.

Hugo
 
H.B. said:
Hi,

I need advice or code sample on how to load a new form from my main form in
a Managed C++ project.

Hugo

The following code describes how to do this:

public __gc class CNewForm : public System::Windows::Forms::Form
{
//add your own stuff in here
}

private: void ShowNewForm ( void )
{
CNewForm* myNewForm = new CNewForm ();
//modal form call
myNewForm->ShowDialog () ;
//non modal call
myNewForm->Show();
}

Good Look! Sebastian Dau
 
Back
Top