Mmmm. Try the following:

Select Project menu, Options, Forms tab.

Remove all forms from the list of autocreated forms (not datamodules) - you
don't need them since you have code to manually create any forms you need.
For the same reason making this change shouldn't cause Delphi to alter your
project source.

Check that the Main Form drop down is blank (nothing selected).

Whenever you add a new form to your project Delphi will add it to the list
of autocreated forms (and will add Application.CreateForm to the project
source. You will still have to manually remove the form from the auto
created list - however your TMainForm shouldn't be created. (Note: There is
an option in Tools\Environment Options to stop auto creating new forms when
you add them to the project but it doesn't seem to work for me - you can try
it).

If Delphi is still putting in code to autocreate TMainForm then the only
thing I can think of is that Delphi is doing something special based on the
name of the form (ie TMainForm might mean something special to it).

Good luck,
David.
DB Solutions.

----- Original Message -----
From: "Neven MacEwan" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, September 05, 2000 1:15 PM
Subject: Re: [DUG]: Any way to stop IDE maintaining Project File


> David
>
> D5
>
> It works fine util I add a new form then
> it updates the project file
>
> Regards
>
> ----- Original Message -----
> From: David Brennan <[EMAIL PROTECTED]>
> To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> Sent: Tuesday, 5 September 2000 11:52
> Subject: Re: [DUG]: Any way to stop IDE maintaining Project File
>
>
> > What version of Delphi are you using?
> >
> > I am using Delphi 5 and I don't have a problem with this. My application
> > creates several datamodules and then creates the main form using a form
> > controller object (which calls Application.CreateForm internally). For
> > example...
> >
> >   Application.Initialize;
> >   Application.Title := 'Shower System';
> >   Application.CreateForm(TdmAdoController, dmAdoController);
> >   ... etc
> >   // Following line creates application main form.
> >   fWorkInProgress :=
> >
>
TfWorkInProgress(GFormController.DisplayMainForm(GFormController.MainFormNam
> > e, Null));
> >   Application.Run;
> >
> > ...works fine - Delphi doesn't try putting in a call to
> > Application.CreateForm. Have you tried removing your mainform from the
> > Project\Options\Forms tab since you are in effect creating the form
> manully?
> >
> > David.
> > DB Solutions.
> >
> > ----- Original Message -----
> > From: "Neven MacEwan" <[EMAIL PROTECTED]>
> > To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 05, 2000 12:13 PM
> > Subject: [DUG]: Any way to stop IDE maintaining Project File
> >
> >
> > > I Have the following project file
> > > But the IDE keeps on spontaneously putting in an extra
> > >       Application.CreateForm(TMainForm, MainForm);
> > >
> > > Any way to prevent this (bar flagging the file RO)
> > >
> > > Regards
> > > Neven
> > >
> > >
> > > begin
> > >   {Attempt to create a named mutex}
> > >   CreateMutex(nil, false, 'MWK-Athena');
> > >   {if it failed then there is another instance}
> > >   if GetLastError = ERROR_ALREADY_EXISTS then begin
> > >    {Send all windows our custom message - only our other}
> > >    {instance will recognise it, and restore itself}
> > >     SendMessage(HWND_BROADCAST, RegisterWindowMessage('MWK-Athena'),
0,
> > 0);
> > >     Halt(0);
> > >   end;
> > >   Application.Initialize;
> > >   with TSplashForm.Create(nil) do
> > >   try
> > >     if FindWindow('TAppBuilder',nil) = 0 then // ide not running
> > >     begin
> > >       Show;   // show a splash screen
> > >       Update; // force display
> > >     end;
> > >     Application.Title := 'MWK Athena';
> > >     Application.CreateForm(TADataModule, ADataModule);
> > >     if ADataModule.Active then
> > >     begin
> > >       Application.CreateForm(TMainForm, MainForm);
> > >       Application.CreateForm(TDBUpdateErrorDlg, DBUpdateErrorDlg);
> > >     end;
> > >   finally
> > >     Free;
> > >   end;
> > >   Application.Run;
> > > end.
> > >
> > >
> > > Regards Neven
> > > N.K. MacEwan B.E. E&E
> > > Ph 649 574 0027
> > > Fax 649 570 2706
> > > Mobile 025 749 062
> > > [EMAIL PROTECTED]
> > > [EMAIL PROTECTED]
> > >
> >
>
> --------------------------------------------------------------------------
> > -
> > >     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