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
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
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
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
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
 

carlw

Member
Joined
Dec 30, 2004
Messages
18
Programming Experience
Beginner
Thats still not showing the second form. I have changed Yourchildformsname to the name of my form.

Carl
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
The first forms empty right? (or at least nothing that would cover form2 up)

Do you get an error?
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
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
 

ritesh_jain1982

Well-known member
Joined
Jan 10, 2005
Messages
53
Programming Experience
1-3
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
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
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...
 
Top Bottom