setting 2nd form as a child form, from first child form

R

Rat

Hi,

For example in my vb.net application i am having

MdiMain Form -- 1 (Parent mdiform)
FrmOne Form -- 2 (Child Form to MdiMain)
FrmTwo Form -- 3 (normal form to be converted to child
Form)

Here from MdiMain Form if i access FrmOne using the
following code. (For converting as a child Form)

Dim form1 As New FrmOne()
form1.MdiParent = Me
form1.Show()

The above code is working fine.

But the problem starts here,,,

i am accessing a file from a menu i.e FrmOne(Child form).

From FrmOne i am access FrmTwo. How will i create FrmTwo
as a Child Form to MdiMain Form.

Regards and Thanks in advance,
Rat
 
A

Armin Zingler

Rat said:
For example in my vb.net application i am having

MdiMain Form -- 1 (Parent mdiform)
FrmOne Form -- 2 (Child Form to MdiMain)
FrmTwo Form -- 3 (normal form to be converted to child
Form)

Here from MdiMain Form if i access FrmOne using the
following code. (For converting as a child Form)

Dim form1 As New FrmOne()
form1.MdiParent = Me
form1.Show()

The above code is working fine.

But the problem starts here,,,

i am accessing a file from a menu i.e FrmOne(Child form).

From FrmOne i am access FrmTwo. How will i create FrmTwo
as a Child Form to MdiMain Form.

Where do you create FrmTwo? I guess in FrmOne:

dim form2 as new frmTwo
form2.mdiparent = me.mdiparent
form2.show
 
H

Herfried K. Wagner [MVP]

* "Rat said:
For example in my vb.net application i am having

MdiMain Form -- 1 (Parent mdiform)
FrmOne Form -- 2 (Child Form to MdiMain)
FrmTwo Form -- 3 (normal form to be converted to child
Form)

Here from MdiMain Form if i access FrmOne using the
following code. (For converting as a child Form)

Dim form1 As New FrmOne()
form1.MdiParent = Me
form1.Show()

The above code is working fine.

But the problem starts here,,,

i am accessing a file from a menu i.e FrmOne(Child form).

From FrmOne i am access FrmTwo. How will i create FrmTwo
as a Child Form to MdiMain Form.

In 'FrmOne':

\\\
Dim f As New FrmTwo()
f.MdiParent = Me.MdiParent
f.Show()
///
 

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

Top