cvbmn
asked on
LOAD and SAVE *.DFM
LOAD and SAVE *.DFM
How to load and save FORMs in DFMs at runtime ?
Thanks.
How to load and save FORMs in DFMs at runtime ?
Thanks.
ASKER
WriteComponentResFile is not working ! ! ! ! !
I tried :
WriteComponentResFile('For m.frm', TForm(Componentlist[0]));
But it doesn't work.
Because Form.frm size is 1kb, but on that form are about 30-40 components.
I exactly need dfm TEXT file to save form.
Or info with RICHEDIT where is DFM TEXT code of choosen FORM.
Thanks.
I tried :
WriteComponentResFile('For
But it doesn't work.
Because Form.frm size is 1kb, but on that form are about 30-40 components.
I exactly need dfm TEXT file to save form.
Or info with RICHEDIT where is DFM TEXT code of choosen FORM.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When you are ready to save your form just write
WriteComponentResFile(‘For
where first parameter is a filename and path of a form file (where to save) and a second parameter is a reference to form (use self while calling from form method)
When you want to load previously saved form do something like this
AForm:=(AFormClass).Create
ReadComponentResFile(aFile
Hope this will help