By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

Mdi Issue

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The property you are supposed to set is MDIParent, not Parent:

NewMDIChild.MdiParent = Me

Good Luck!

"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:OZ*************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #2

P: n/a
* "Stan Sainte-Rose" <st**@cyber972.com> scripsit:
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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.