MDI Parent child

  • Thread starter Thread starter Paul Mars
  • Start date Start date
P

Paul Mars

I have a Parent form that opens a child form. Now I need this child to open
another form and have it as a child of the original parent. How can I assign
it as a child?

tx,
Paul
 
Hi Paul,

Are you looking for this part of the syntax?
\\\
frm3.MdiParent = Me.ParentForm
frm3.Show()
///

Cor
 
Cor, that works for the first child, but not for the second child. Remember
that the second child is called from the first child. So I can not:

2ndChild.MDIParent=Me
or
2ndChild.MDIParent=Parent
 
* "Paul Mars said:
I have a Parent form that opens a child form. Now I need this child to open
another form and have it as a child of the original parent. How can I assign
it as a child?

\\\
Dim f As New SampleForm()
f.MdiParent = Me.MdiParent
f.Show()
///
 
Hi Paul,

That works see Herfried with the same answer, however I think you mean
something as this, which I tested however if it is real the solution I do
not know, because I never use a mdi

You can show with this a MDI from every form in my opinon.

Cor
\\\
Public Shared frm2 As New Form2
Public Shared frm3 As New Form3
Private Sub FormMdi_Load(ByVal _
sender As Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
frm2.MdiParent = Me
frm3.MdiParent = Me
frm3.WindowState = FormWindowState.Maximized
frm2.WindowState = FormWindowState.Maximized
frm2.Show()
End Sub
///
\\\form2 and form3
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Form1.frm3.Show()
Me.Hide()
End Sub
///
 
continued development.

FormParent load opens FormChildA.
FormChildA btn click opens FormChildB.
(FormChildA and FormChildB are both children of FormParent)
(FormChildA and FormChildB are different forms)

Problem: FormChildA btn click can only open one instance for FormChildB.

Any suggestions or ideas please.

tx,
Paul
 
Paul Mars said:
continued development.

FormParent load opens FormChildA.
FormChildA btn click opens FormChildB.
(FormChildA and FormChildB are both children of FormParent)
(FormChildA and FormChildB are different forms)

Problem: FormChildA btn click can only open one instance for
FormChildB.

Any suggestions or ideas please.

Remember that you've opened it already. Don't open it again if you already
did.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Back
Top