Mdi Issue

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

Hi,
It's me again with MDI Question.
I would like to understand something.

I have a Procedure where I create Child Form

Dim ChildF As New MyForm
ChildF.TopLevel = False
ChildF.Parent = Me.Parent
ChildF.IDCUSTOMER = IDCUSTOMER
ChildF.Name = IDCUSTOMER.ToString
ChildF.Show()

This part works.
But if I test the property like this
ChildF.IsMdiChild I get False

What I missed ?

Stan
 
The property you are supposed to set is MDIParent, not Parent:

NewMDIChild.MdiParent = Me

Good Luck!
 
* "Stan Sainte-Rose said:
It's me again with MDI Question.
I would like to understand something.

I have a Procedure where I create Child Form

Dim ChildF As New MyForm
ChildF.TopLevel = False
ChildF.Parent = Me.Parent
ChildF.IDCUSTOMER = IDCUSTOMER
ChildF.Name = IDCUSTOMER.ToString
ChildF.Show()

This part works.
But if I test the property like this
ChildF.IsMdiChild I get False

What you are creatung is not an MDI form. MDI forms have their
'MdiParent' property set to an MDI container ('IsMdiContainer' set to
'True' for the container). Setting 'TopLevel' and 'Parent' doesn't
create a real MDI environment.
 
Back
Top