set form.owner

  • Thread starter Thread starter guoqi zheng
  • Start date Start date
G

guoqi zheng

Dear sir,

I would like to open form1 from form2. Form2 contains a menu item, when
click one of the menu items, I do the following.

Dim s As New Form3
s.Owner = Me
s.Show()

What I want is that form1 open within the windows of form2, can not be
larger than or outside form2.

What I did wrong here?

regards,

Guoqi Zheng
http://www.ureader.com
 
guoqi zheng said:
I would like to open form1 from form2. Form2 contains a menu item, when
click one of the menu items, I do the following.

Dim s As New Form3
s.Owner = Me
s.Show()

What I want is that form1 open within the windows of form2, can not be
larger than or outside form2.

Instead of setting the form's 'Owner' property you may want to check the
form's 'IsMdiContainer' and 'MdiParent' properties.
 
Back
Top