Hi Jim,
You need to set the StartPosition for the child form to Manual and then set the Location property to the actual position you want to set the form to like the following:
OrdersForm.MdiParent = Me
OrdersForm.StartPosition = FormStartPosition.Manual
OrdersForm.Location = New System.Drawing.Point(30, 30)
OrdersForm.Show()
In your case you can also query the coordinates of the Treeview control to get the exact location to set for the child form. In my example above, I just hardcoded the location. Yours could be more dynamic.
>All,
>
> I have a MDI application. I want to set the location for the child forms in the constructor of the child form. I want the child form to position itsself next to a treeview control on my parent form. What is the best way to do this?
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi