Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDIParent propertiy setting

Status
Not open for further replies.

VBDotNetProgrammer

Programmer
Jul 9, 2003
50
GB
Hi all,

OK this is the scenario:

I have a main window which is an mdiparent window.

Now say i open a form i can set its parent properties like this

dim aform as new form
aform.mdiparent=me
aform.show()

now say i then have a button on aform which creates a new form again. Now how do i set that form mdiparent to = the main window as i did for the form that calls it?

Any ideas?
 
I think this will work:
Code:
frmChild.MdiParent = Me.ParentForm
 
Dim mYForm As Form
mYForm = New Form2()
mYForm.MdiParent = Me.ParentForm
mYForm.Show()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top