When creating a new instance of a MDI child form, the form will load in cascading order in relation to the open forms by default. Most of the time this is acceptable, but if you run into a situation where you want to load it in the center of the parent you may run into a bit of trouble.The default property for showing a form in the center of a parent looks like this:
MdiChildUI form = new MdiChildUI(); form.MdiParent = this; form.StartPosition = FormStartPosition.CenterParent; form.Show();
Dim form As New MdiChildUI form.MdiParent = Me form.StartPosition = FormStartPosition.CenterParent form.Show()
To make the window show by default in the center of a MDI parent, you must set the StartPosition to be CenterScreen as opposed to CenterParent. In a MDI environment, child forms consider the parent MDI window to be their screen.
form.StartPosition = FormStartPosition.CenterScreen;
form.StartPosition = FormStartPosition.CenterScreen