• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 624
  • Last Modified:

loading DFM forms into an app at run-time

I have a problem that I was hoping you would be able to offer me some advice with. I am writing an application that allows the user to tailor forms at run-time by moving controls and adding fields. The only difficulty that I am having is with saving and reloading the forms. I have read some material on how to do this but it is incomplete. I would like my application to create a file for each form that is similar to a delphi DFM file. I have used the readcomponent & writecomponent methods in the TFilestream object but I can only save the components on the form not the form itself. Can you give me any pointers on how to
save a form and all of its components to a file similar to a Delphi DFM file. Any help would be appreciated even if it is just a point in the right direction.

Regards. Richard Grant
0
bep0086
Asked:
bep0086
  • 2
1 Solution
 
mirek071497Commented:
This have big count of code lines.
But you can made simple class with FormName, Size .... and create form when you load this component.

0
 
mirek071497Commented:
Hi bep0086
I try WriteComponentResFile( 'd:\mirek.dfm', MyForm ); and all is ok. What can't you do ? Mayby you use another method ? This metod create good dfm files and you can read this by ReadComponentResFile (..);
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now