Delphi Forms lazarus / 10-Designer ---------------------------------------------------------------------- Degibbo · 2017-07-21 00:20 G'day all, Total newby here, just downloaded Lazarus yesterday, so please be kind. I have a Delphi 2010 project that I need to modify with Lazarus, but the forms files are binary, not text so don't show as visual forms with components. Is there a simple way to get around this? Cheers & thanks, DG PS, please advise if I am posting in the wrong area. ---------------------------------------------------------------------- molly · 2017-07-21 00:24 Hi and welcome Degibbo, Wiki entry on Delphi converter can be read here. The converter can sometimes be a miss though. There are several threads available on the subject, so feel free to do a search or mention in case you run into problems. Lazarus for Delphi users wiki entry (here) might be able to help you out as well. ---------------------------------------------------------------------- Degibbo · 2017-07-21 04:12 G'day Molly, Thanks for the tips.  The conversions seem to work, but it looks like each has to be converted individually, so a bit tiresome with the 60 units and 60 forms that I have to convert! The converter appears to turn binary forms into text, but I still can't get forms to show as a form individually, (F12 is grayed out) so I must be doing something wrong! Any quick hints? Thanks, DG ---------------------------------------------------------------------- JuhaManninen · 2017-07-21 06:55 Quote from: Degibbo on July 21, 2017, 06:12:22 amThanks for the tips.  The conversions seem to work, but it looks like each has to be converted individually, so a bit tiresome with the 60 units and 60 forms that I have to convert! It can convert a whole project or package. QuoteThe converter appears to turn binary forms into text, but I still can't get forms to show as a form individually, (F12 is grayed out) so I must be doing something wrong! With the textual .lfm file you should be able to show the form as all its information is stored in the .lfm. Can you attach problematic unit + form files here? I think your project is very old. Delphi used binary forms only in the early versions. ---------------------------------------------------------------------- Degibbo · 2017-07-21 07:10 G'day JuhaManninen, OK, if I convert a "project" file it does not appear to trickle down through all of the used units and forms, so I must be doing it wrong. For example: if I convert one particular DFM file I get a "syntax error", but it doesn't appear to show me where (and what) the error is! It probably can, but I don't know how. I am sure that these are problems from my ignorance, and yes, the 20,000 odd lines of code program is very old, as am I.  So far, I have not found Lazarus very "intuitive", but I am sure it is just me. Probably fantastic for an experienced user (my last programming was over 10 years ago).  So, I have a lot to re-learn, and unfortunately I require step by step instructions. Cheers & thanks, DG ---------------------------------------------------------------------- marcov · 2017-07-21 10:14 Quote from: Degibbo on July 21, 2017, 09:10:24 amI am sure that these are problems from my ignorance, and yes, the 20,000 odd lines of code program is very old, as am I.  So far, I have not found Lazarus very "intuitive", but I am sure it is just me. Binary DFMs have been deprecated since Delphi 4 in 1998 and are mostly extinct. (near 20 years of technical debt in that project). Lazarus is only gaining as highly compatible Delphi substitute since the 2005-2007 period, and these two facts combined is  s probably why nobody worked on a newer version (either developer or external contributor).  The related need for an old Delphi version to test with might also be prohibitive. ---------------------------------------------------------------------- WooBean · 2017-07-21 11:14 I have found an utility named DFMConverter which states in its "About window": "This DFM converter was developed by HREF Tools Corp., July- August 2006.  You may distribute it freely to your friends and colleagues." Dowloaded from Embarcadero, not tested as never needed. It has an ability of 2-way binary/text DFM Delphi files conversion. ---------------------------------------------------------------------- ASerge · 2017-07-22 04:59 Quote from: marcov on July 21, 2017, 12:14:08 pmBinary DFMs have been deprecated since Delphi 4 in 1998 and are mostly extinct. (near 20 years of technical debt in that project). Yes, starting from the specified version, Delphi contains the option "New forms as Text" in the settings (Form Designer), which is enabled by default. Also all versions of Delphi contain the utility "convert.exe", which converts between text and binary forms. ---------------------------------------------------------------------- JuhaManninen · 2017-07-22 06:23 Quote from: Degibbo on July 21, 2017, 09:10:24 amOK, if I convert a "project" file it does not appear to trickle down through all of the used units and forms, so I must be doing it wrong. Ok, maybe it does not recognize the units as part of the project. You have 2 choises then: 1. Add them to the project in Delphi before converting. 2. Select all units at once when using the "Convert Delphi Unit to Lazarus unit ..." feature. The file open dialog has multi-select enabled. QuoteFor example: if I convert one particular DFM file I get a "syntax error", but it doesn't appear to show me where (and what) the error is! It does not handle all error situations well. Can you attach the problematic unit for testing? QuoteI am sure that these are problems from my ignorance, and yes, the 20,000 odd lines of code program is very old, as am I. People suggested other tools for converting binary form files but the converter can do that piece perfectly well. No need for other tools for that. ---------------------------------------------------------------------- Degibbo · 2017-07-24 03:53 Thanks for the help everyone.  I have now managed to compile the project with no errors. However there is still a couple of forms that don't show.  In order to get the project compiled, there was a lot of stuff that I had to comment out, which I will address later. With the "main" form, from the dot pas file, F12 produces the error message: (Wrong token type. Symbol expected but { found (at 3339,2,stream offset 147377)).  Now this is clearly due to one of my comment-outs, but how do I show where in the code from this magical number? Some previous errors have shown the first number as the unit line and character position, but this main unit only has 2000 odd lines! Cheers & thanks for the continuing support. DG