Mdi question

  • Thread starter Thread starter BMax
  • Start date Start date
B

BMax

Hello
I created a form that is Mdi container another for child and a dialog form
which is suppose to open that child inside the container.
so i have :
1- main form (Mdi Container)
2- child form (Mdi child)
3- Dialg form (something like a menu to open the childes inside main form)

lets say dialog form has a button click event, how can i set the MdiParent
of child form without creating a new instance of parent form.
thanks in advance,
 
* "BMax said:
I created a form that is Mdi container another for child and a dialog form
which is suppose to open that child inside the container.
so i have :
1- main form (Mdi Container)
2- child form (Mdi child)
3- Dialg form (something like a menu to open the childes inside main form)

lets say dialog form has a button click event, how can i set the MdiParent
of child form without creating a new instance of parent form.

Pass a reference to the MDI main form to your dialog, for example in a
property.
 
* "BMax said:
could you please show an example. some code.

In your dialog:

\\\
Public Class FooForm
Inherits...

Private m_TheMdiContainer As MainForm

Public Property TheMdiContainer() As MainForm
Get
Return m_TheMdiContainer
End Get
Set(ByVal Value As MainForm)
m_TheMdiContainer = Value
End Set
End Property
 
Back
Top