Hi All
I'm having trouble trying to instantiate
the main form for an application by reading it from a resource file. My
objective is to have the form restore itself to the same settings as the
previous session when it closed.
I don't have any problems restoring individual
controls on the form by streaming them to and from a stream file using the
OnCreate and OnClose events, but this seems an inconvenient way of doing it when
I ought to be able to restore the form in one go.
I'm able to read and write
sub-forms successfully using Read/WriteComponentResFile() and the
CreateNew() class method, but I can't do this with the main form
because it is created by Application.CreateForm() which uses the resource file
that is compiled into the .exe. There doesn't seem to be any way of
switching TApplication's MainForm to another form and so I can't see an easy
workaround (or any workaround) - but maybe someone else has devised a
way to do it.
My apologies if this subject has been thrashed on
the list before.
Bob Osborn
|
Title: Message
- [DUG]: Column Names Neven MacEwan
- RE: [DUG]: Column Names Kyley Harris
- Re: [DUG]: Column Names Neven MacEwan
- RE: [DUG]: Column Names Kyley Harris
- Re: [DUG]: Column Names Neven MacEwan
- Re: [DUG]: Column Names Nello Sestini
- Re: [DUG]: Column Names Neven MacEwan
- Re: [DUG]: Persistent Main form Bob Osborn
- Re: [DUG]: Persistent Main form Neven MacEwan
- RE: [DUG]: Column Names Stacey Verner
- Re: [DUG]: Column Names Neven MacEwan
- RE: Re: [DUG]: Column Names Peter Speden
- RE: Re: [DUG]: Column Names Andreas Toth
- Re: Re: [DUG]: Column Names Neven MacEwan
- RE: RE: Re: [DUG]: Column Names Peter Speden
- RE: RE: Re: [DUG]: Column Names Andreas Toth
- RE: Re: Re: [DUG]: Column Names Peter Speden
- Re: Re: Re: [DUG]: Column Names Neven MacEwan