Solved

loading DFM forms into an app at run-time

Posted on 1997-08-12
2
610 Views
Last Modified: 2010-04-03
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
Comment
Question by:bep0086
  • 2
2 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1341254
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
 
LVL 3

Accepted Solution

by:
mirek071497 earned 200 total points
ID: 1341255
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now