Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 435275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:21:35+00:00 2026-05-12T20:21:35+00:00

Our application used to make use of a common base form that all forms

  • 0

Our application used to make use of a common base form that all forms were meant to inherit from. I’d like to get rid of it for a number of reasons, ranging from the need to police that everyone uses it to several annoyances relating to Delphi’s VFI implementation. It turns out that the bulk of the features it offered can be done in other, more reliable ways.

The one that I am not so sure about, is automatically positioning all forms in the center of their callers. So if I open Dialog A from my main form, it should be placed over the center of the main form. And if I then open Dialog B from Dialog A, it should be placed over the center of Dialog A and so on.

We used to take care of all this by setting the base form’s Position property to poOwnerFormCenter and it worked great. But how do I do this app-wide?

I thought of using Screen.OnActiveFormChange, but I think this happens each time the form receives focus. I also thought of using Application.OnModalBegin but there doesn’t seem to be an obvious way to find the form at the point this is called.

Has anyone tried this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:21:35+00:00Added an answer on May 12, 2026 at 8:21 pm

    Well, obviously form inheritance is provided to solve exactly the problem you’re trying to solve. Any solution is probably going to wind up mimicking form inheritance in some way.

    Could you do something as simple as globally searching your code for “= class(TForm)” and replacing the TForm class with either your existing base form or a new, simplified base form class with only the functionality you need?

    Failing that, you could try to modify the original TForm class itself to have the positioning behavior you want. Obviously, modifying the supplied classes is a little on the dangerous side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use OpenFileDialog across our application to select files. So far, we never used
We are deploying memcached for our application, and I would like to make it
I have used the andengine.jar file in our application. I have run the physicsexample.
I'm writing a ASP.NET application used within our company. Now I want to send
We are in the process of creating active-x controls used within our application. Since
In our windows application, we used crystal reports. If a customer needed a custom
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
We have a command line application that could benefit from a GUI. We want
I am going to develop a mobile application used by our company salesmen to
Our project has about 20 developers, but our application makes relatively light use of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.