How to save forms and frames compiled in Delphi 6 - 2007?

We recently converted our long-term Delphi project to Open Source. Several people have already made corrections, but this is very cool, but, unfortunately, the forms and frames when saving from Delphi 2006 (and later) contain new properties in .dfm that are not processed by older versions. Forms are processed quite elegantly using the IDE ("ignore propertyy?"), But frames are loaded at runtime and lead to errors. Not an option, as far as I know.

Now I manually removed these properties from the .dmf files, but I'm really wondering if there is a more elegant solution. There is no way to save in a backward compatible format from the new IDEs, is there? Are there existing tools to remove unsupported properties from .dfm? Any other elegant solution that I am missing?

Usually, with a commercial project, I would just upgrade the project to the latest version applicable ... but since it is open source, I really do not want to lose to those developers who are still working on Delphi 7. In fact, this includes me .

+6
forms delphi
source share
3 answers

The JEDI JVCL project uses the small utility dc.exe (delphi cleaner) and a list of properties in DFM that are not available in older versions of delphi, my contains the following text:

*.PopupMode *.PopupParent *.ExplicitLeft *.ExplicitTop *.ExplicitWidth *.ExplicitHeight *.BevelKind *.BufferDocument *.DoubleBuffered *.ParentDoubleBuffered *.DisableHyperlinks *.AlwaysEnquoteFloats *.PixelsPerInch 

I ran this dc.exe utility from a batch file that cleans my dfms before I commit the changes to the subversion. The syntax in my batch file for this is:

 dc.exe -s -fd10.txt *.dfm -i 

You can grab my stuff at:

 http://sites.google.com/site/warrenpostma/files 
+11
source share

You can try Andy DFMCheck . It can automatically open and close all forms and frames in the project, which makes the IDE remove unknown properties (as Marco wrote ).

+4
source share

Well, for the sake of completeness:

Open dfms in old Delphi, let it delete all unknown properties, change the property and save.

For your purposes, Warren's solution is better, but it can be a workaround. I did this for a while when we were dual D7-D2006.

+3
source share

All Articles