> > Does the main form HAVE TO BE the first form created in the main body of
the
> > application?
> > The reason of this question is: the main form's OnCreate event handler
opens
> > datasets created in the Data module (I want these datasets to be shared
> > among several units).
>
> No just the first one that uses Application.CreateForm()
>
> You can of course still use...
>
> TheDataModule := TTheDataModule.Create(Application);
> Application.CreateForm(TMainForm,MainForm);
>

In fact a TDataModule doesn't count no matter what you do - it's not a
TCustomForm so it can't be the mainform. You can create as many datamodules
as you want, using Application.CreateForm or otherwise, before you create
your real main form.

David.
DB Solutions.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to