How to save form to a DFM file at runtime in Delphi

It's very simple. Just drop TFormSaver component onto your form, set DataFormat property and call the SaveToDFM method.


Also you can save form to stream with SaveToStream method.

See also
Form Saver
Components for Delphi / C++ Builder
Howtos for Programmers