Exactly.
Thanks for all the reponses.
Cheng

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of David Brennan
Sent: Tuesday, 5 September 2000 10:15
To: Multiple recipients of list delphi
Subject: Re: [DUG]: TApplication.MainForm


Hi,

Puzzled by your comments. There shouldn't be any problem sharing a dataset
between multiple forms. Of course all forms will have to be displaying the
same record at the same time - it is the same dataset after all. If you want
a seperate copy for each form then you need to do just that (possibly by
creating a datamodule instance for each form at run time and linking them in
code). Similarly there shouldn't be a problem with creating two instances of
the same form. However you will have to use a different pointer for both
instances of the form (your mainform variable can't point to both).

I'll grant you that doing these things requires a rather more sophisticated
application. However they are certainly possible.

David.
DB Solutions.

----- Original Message -----
From: "Rohit Gupta" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, September 04, 2000 8:17 PM
Subject: Re: [DUG]: TApplication.MainForm


> First you do realise that its a Claytons offering.... you can share it
> between several units, but only one form can use a so-called shared
dataset
> at a time.
>
> You definitely cant do things like launching two instances of a particluar
> form.
>
> I open the datasets in the Databases's oncreate.
>
> Additionally, the code in the dpr file looks like ...
>
>
> Application.CreateForm (mainform)
> Initalization
> MainForm.Show
> Application.CreateForm (Datamodule)
> more initialization
> Application.Run
>
> -----Original Message-----
> From: Cheng Wei <[EMAIL PROTECTED]>
> To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> Date: Monday, 4 September 2000 15:13
> Subject: [DUG]: TApplication.MainForm
>
>
> Hi all,
>
> 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).
>
> Cheers
> Cheng
>
> --------------------------------------------------------------------------
-
>     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"
>
>
> --------------------------------------------------------------------------
-
>     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"

---------------------------------------------------------------------------
    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"

---------------------------------------------------------------------------
    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