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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDI Forms Question

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
vb.net 2010 application using a couple of third party controls. VIBLEND and VisualStyler.

I'm trying to set a main MDI form so my other forms stay within the application. I'm noticing some slowness once my app has a parent MDI and a child MDI forms. what's the correct way to call the child forms within an app ? I took away the 3rd party tools and still have performance issues.

any help would be appreciated



 
I haven't got VS running at the moment, but from memory you need to set the mdiparent property of the child form to the mdihost form.
 
I've just quickly checked:

Form1 has IsMDIContainer set to True then:

Code:
Public Class Form1

	Private Sub NewToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NewToolStripMenuItem.Click
		Dim f2 As New Form2
		[b]f2.MdiParent = Me[/b]
		f2.Show()
	End Sub
End Class

After this Form2 works as expected as is fully contained within Form1.

If you are adding the child form from somewhere else in the program, replace "Me" with the name of your mdi container.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top