Guest nolc Posted July 24, 2002 Posted July 24, 2002 Ok...I have an MdiParent form named MAIN & 3 other forms as MdiChildren. When I call a frmEditOrder.Show from the Tracking form it loads a brand new form and doesn't include it within the Parent Form, MAIN. Any ideas? Below is my code thus far..... [b]' MAIN CODE [/b] Private Sub MAIN_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load OrderEntry.MdiParent = Me Tracking.MdiParent = Me frmEditOrder.MdiParent = Me End Sub Private Sub mnuTracking_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuTracking.Click Tracking.Show() Tracking.WindowState = FormWindowState.Normal Tracking.StartPosition = FormStartPosition.CenterScreen End Sub [b]' Tracking CODE [/b] Dim frmEditOrder As EditOrder = New EditOrder() With frmEditOrder .StartPosition = FormStartPosition.CenterParent .Show() End With Quote
Anis Posted July 24, 2002 Posted July 24, 2002 Have you set Form MDIChild Property to True? EDIT: Hey.. I didnt notice its for .Net.. So i am not too sure.. Sorry Quote Regards, Anis Miles to go Before I Sleep.
Guest nolc Posted July 24, 2002 Posted July 24, 2002 Yeah...I've tried doing the same thing, but it didn't work. Thanks... Quote
Guest lepernet Posted July 27, 2002 Posted July 27, 2002 Did you set the main forms "IsMdiContainer" property to "true" ? Quote
*Gurus* divil Posted July 28, 2002 *Gurus* Posted July 28, 2002 Just calling a frmEditOrder.Show from the MDI Parent form is not enough to tell the new form to be a child form. You have to do it like this: Dim f As New frmEditOrder() f.MDIParent = Me f.Show() Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.