Center an MDI child form within the parent
By: Chris Gibbs Date: 13/07/1998


327 bytes

Download now!

This is a code example useful when you need to center an MDI child form within the parent window. The Sub (CenterChild) requires two arguments. The first of these two arguments is the name of the MDI (parent) form. The second argument is the name of the MDI child form.


CenterChild(Parent as MDIForm, Child as Form)


Parent: name of the parent form to center the child form within
Child: name of the child form to center

Type of data





The next thing you will need to do is actually call the CenterChild procedure.

Call CenterChild(MDIForm, Form)

The function is contained in a module. You can cut and paste it in any program of yours.

Click Here!

Visual Basic Programming Zone is a website by Lorenzo Dalla Vecchia.
Webmaster's e-mail:
Hosted by InWind: