I didn't use MDI child so far, in .NET, but let me give a shot.
Before my comment, please check your compiler; are you using C++/CLI
(Visual Studio 2005) or Managed Extensions for C++ (Visual Studio 2002,
Visual Studio 2003)?
If you are using C++/CLI, the above declaration of Form2 is fine.
Otherwise, for the latter case, you need to do this:
Form2* MyForm = new Form2();
The rest is almost identical to C# equivalent of the code, except those
dots (.) should be replaced with arrows (->).
MyForm->MdiParent = this;
MyForm->Show();
Ismail
tlemcenvisit - 27 May 2005 06:18 GMT
Hello
I use Visual C++.NET 2005 Beta2.
The project type is "CLR:Windows Forms Application"
When I use this code :
Form2* MyForm = new Form2();
MyForm->MdiParent = this;
MyForm->Show();
The compiler signals these errors :
error C2039: 'MdiParent' : is not a member of 'System::Enum'
error C2039: 'Show' : is not a member of 'System::Enum'
And when I use this code :
Form2^ MyForm = gcnew Form2();
MyForm->MdiParent = this;
MyForm->Show();
The compiler signals these errors :
error C2039: 'MdiParent' : is not a member of 'System::Windows::Forms::Form2'
error C2039: 'MdiParent' : is not a member of 'System::Windows::Forms::Form2'
Please help me
Marcus Heege - 30 May 2005 20:08 GMT
Are you sure you have derived Form2 from System::Windows::Forms::Form?
> Hello
> I use Visual C++.NET 2005 Beta2.
[quoted text clipped - 23 lines]
>
> Please help me
tlemcenvisit - 31 May 2005 05:57 GMT
I create form2 with designer as each form