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

  • Home
  • SEARCH
  • 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

Our application is written in C++ and used on Windows XP. On some client
Our application is structured something like: UI <--> REST API <--> Workflow <--> Business
Our application runs off MySQL, but a client has another application that requires SQL.
I develop a critical application used by a multi-national company. Users in offices all
Our system communicates with several web services providers. They are all invoked from a
I am trying to make a simple application which will be used to point
Hey is this possible to make an application which can be used to see
We needed a location service for our app that was available from anyplace. We
Our application is interfacing with a lot of web services these days. We have
Our application is a hybrid Win32 unmanaged application and a .NET 2.0 managed application.

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.