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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top