Center Your Logo on MDI Forms

You can display a logo in the middle of your MDI form. The logo stays in the middle even when the MDI form is resized. After creating your own MDI form, add a standard form to your project and put an Image control named imgLogo on it. Instead of the Image control, you can use a Label control or whatever you want. The standard form (frmLogo) should have these properties set:

 PROPERTIES of frmLogo:MDIChild = TrueBorderStyle = 0 - NoneThen put this code in your MDI form Resize event:Private Sub MDIForm_Resize()' Now center the frmLogo form in your MDI formfrmLogo.Left = (Me.ScaleWidth - frmLogo.Width) / 2frmLogo.Top = (Me.ScaleHeight - frmLogo.Height) / 2End SubPut this code in the logo form

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: