Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Centering a form

Posted on 1999-01-04
3
Medium Priority
?
281 Views
Last Modified: 2011-09-20
How do you load a form into a MDI form and not have it open in the upper lefthand corner of the MDI form. Would like it to open in the center. In the form layout window I both forms in the center. The MDI Properties "Window State" is set to 2-Maximized.
0
Comment
Question by:tbred
  • 2
3 Comments
 

Accepted Solution

by:
jmnolan earned 800 total points
ID: 1453815
You have to position it manually. This can be done in the Load event or where ever else youd like to put it.

Esentially this code in the child forms Load event:

Me.Top = (MDIForm1.ScaleHeight - Me.Height) / 2
Me.Left = (MDIForm1.ScaleWidth - Me.Width) / 2
0
 

Author Comment

by:tbred
ID: 1453816
Thanks Tbred
0
 

Author Comment

by:tbred
ID: 1453817
Thanks jmnolan
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question