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

  • Thread starter Thread starter Rat
  • Start date Start date
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
 
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
 
* "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()
///
 
Back
Top