DFM Conversion

Top  Previous  Next

User interface > Translation options > DFM Conversion

DFM translation for Delphi2C# has been formally derived from the corresponding Delphi2Cpp feature. This feature is experimental and has not yet been fully implemented or tested. In particular, there is currently no C# translation of the VCL, so the generated form code cannot be expected to compile or run as a complete C# application. The feature will be completed and adapted to the specific requirements of C# if there is sufficient practical demand for it.

 

When the DFM translation is enabled in the processor options, by default all lines of the DFM code are converted to C# assignment statements. However, when the Delphi compiler reads the DFM code, more can actually happen than simple assignments. To reproduce these additional effects, Delphi2Cpp can be configured to issue special DFM conversion routines when properties of certain types are to be assigned values. The dialog in which these types and properties are listed appears when you click the "DFM Conversion" button at the bottom left of the options dialog.

 

 

DfmConversion

 

 

In the example, a conversion is created for the OldCreateOrder property of a form. If the code is retranslated after the new routine has been inserted, the output window:shows the following line:

 

 

AssignFormOldCreateOrder

 

 

Remark: Normally the name of a specific type starting with 'T' should be entered in the Type column. However, the example shows the special case in which a routine is defined for all classes derived from TForm.

 

The table items can be loaded and saved via the popup menu.



This page belongs to the Delphi2C# Documentation

Delphi2C# home  Content