set form.owner

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
 
H

Herfried K. Wagner [MVP]

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.
 

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