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 8690159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:50:40+00:00 2026-06-12T23:50:40+00:00

Possible Duplicate: Is there a Delphi option to ‘lock’ the design (layout) of a

  • 0

Possible Duplicate:
Is there a Delphi option to ‘lock’ the design (layout) of a form against accidental changes?

We recently changed have changed from StarTeam to SVN, but we’re having problems with our DFM files. It looks like Delphi changes the DFM files even though we’re not actually changing the form.

For example: I open an existing file, I change the active tabsheet, save the file, change the tabsheet back to it’s original state, and save it again. When I diff the two files, the PixelsPerInch, TextHeight, Top, and lots of other values have changed? A little sample of my code:

   PixelsPerInch = 96
      TextHeight = 13
      inherited PageControl1: TPageControl
        Top = 105
        Height = 629
        Margins.Left = 5
        Margins.Top = 5
        Margins.Right = 5
        Margins.Bottom = 5
        HotTrack = True
        inherited TabSheet1: TTabSheet
          Margins.Left = 5
          Margins.Top = 5
          Margins.Right = 5
          Margins.Bottom = 5

My question is: is there a way to let Delphi only change the DFM only if the form has changed? Now, we have conflicts when we Update in SVN all the time.

  • 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-06-12T23:50:41+00:00Added an answer on June 12, 2026 at 11:50 pm

    This is just a consequence of how Delphi’s form streaming mechanism works.

    When you open a form in the Delphi designer, the .dfm file is used to create instances of each component on the form. In your case, the form designer will instantiate each of the objects in the .dfm file. Each property in the .dfm file will be read in.

    Then, if you do anything in the designer that marks the form as having been modified, for example changing the active tabsheet, then the designer will re-create the .dfm file when you save. And it re-creates the .dfm file by asking the in-memory components to save themselves. This saving process makes no account of what the .dfm file on disk looks like. Each component just saves its properties as they are at that point in time.

    So, in summary, there’s really nothing you can do to change Delphi’s behaviour. The best you can do is to work around it to minimise the impact.

    If your forms have Scaled=True then you should make sure that all developer machines use the same font scaling. Otherwise when developer A saves at one font scaling, that .dfm file will be completely different from the one that developer B saves at a different font scaling. All positions will be altered. It sounds as though you have some developers that use 120dpi font scaling. And that’s going to give you no end of grief.

    If benign edits to the form file result in large changes, commit those changes. Once you have every developer machine configured the same way, you’ll find things settle down. Those benign edits should no longer result in .dfm file changes.

    This is just one of the occupational hazards of visual design with Delphi. You need to pay lots of care and attention to your .dfm files whenever you commit. I regularly find myself reverting changes to .dfm files from the Tortoise commit dialog. I also often elect to modify the .dfm file in a text editor rather than using the form designer!

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

Sidebar

Related Questions

Possible Duplicate: Is there any hash function in PL/SQL? I have a column with
Possible Duplicate: Is there any working memory profiler for Python3 I have some script
Possible Duplicate: How to run a database script file from Delphi? I have a
Possible Duplicate: What Web Application Framework for Delphi is recommended? We have a Delphi
Possible Duplicate: Is there a difference between YES/NO,TRUE/FALSE and true/false in objective-c? I have
Possible Duplicate: PHP - PRE-select drop down option I have a situation in my
Possible Duplicate: In there a generic constructor with parameter constraint in C# I have
Possible Duplicate: Is There A Built-In Way to Split Strings In C++? i have
Possible Duplicate: Is there a CSS parent selector? Say you have: ---------- X ----------
Possible Duplicate: Is there a proved mouseOver workaround for FirefoxDriver in Selenium2? I want

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.