devxlogo

Center Your Logo on MDI Forms

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

See also  How College Students Can Shape the Future of Tech Responsibility
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist