MDI Relation ship

  • Thread starter Thread starter krishna
  • Start date Start date
K

krishna

Hi,

I have doubt in MDI forms
genarally we will set formname.MdiParent=me in the mdi
form if it is child but my doubt is when i open another
child in the child form of the mdi form it is comming out
side when i was runnig the application.
how to set mdi relation in another child of mdi child.plz
give me the reply


Regard,
krishna.
 
Hi Krishna,

In your MDI form you can write the following code

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim f2 As New Form2
f2.MdiParent = Me
f2.Show()
End Sub


In the first child form from which you are calling the second one, the code
is

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim f3 As New Form3
f3.MdiParent = Me.MdiParent
f3.Show()
End Sub

HTH

Mona
 
Back
Top