Solved

loading DFM forms into an app at run-time

Posted on 1997-08-12
2
616 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
delphi parse string to params 3 157
How to debug For loops? 3 63
Delphi inherited method 6 80
firemonkey keyboard covers the controls 1 53
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…

726 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