How do i create a form inside a form

carlw

Member
Joined
Dec 30, 2004
Messages
18
Programming Experience
Beginner
Hi

How do i create a form inside a form. Like in Excel/Word.
I know this has probably been answered hundreds of times but i just cant find anything on it.

Carlw
 
Hey
Set the parent form's 'IsMDIContainer' property to true. then when you call the form, before you do show it set it's MdiParent = me
TPM
 
The 'IsMDIContainer' property is under properties in form designer.

To call the new Mdi child form:
dim NewMdiChild as YourChildFormsName
NewMdiChild.mdiparent = me
NewMdiChild.show

Hope that helps
TPM
 
Thats still not showing the second form. I have changed Yourchildformsname to the name of my form.

Carl
 
The first forms empty right? (or at least nothing that would cover form2 up)

Do you get an error?
 
Your second form does have stuff on it right?

you put this on the parent form right? (and in a sub)
dim NewMdiChild as YourChildFormsName
NewMdiChild.mdiparent = me
NewMdiChild.show
 
Hi,
adding extra word to TPM Code........

try with

Dim objform As New frmChildFormName()
objform.MdiParent = Me
objform.Show()

Hope this will Work.............................:cool:

Regards,
Ritesh
 
ritesh_jain1982 said:
Hi,
adding extra word to TPM Code........

try with

Dim objform As New frmChildFormName()
objform.MdiParent = Me
objform.Show()

Hope this will Work.............................:cool:

Regards,
Ritesh

LOL, my bad. Strange there was no error though...
 
Back
Top