Board index » delphi » Project creating Main Form Twice

Project creating Main Form Twice

I've got a problem in several applications where it wants to create the
MainForm twice in my .DPR file.  If I go to View/Project Manager/Options, I
can make sure that my Main form setting is set to "MainForm", then when I
View/Project Source,  I have   Application.CreateForm(TMainForm, MainForm)
twice in the code.  So, I delete one, but if I go back to View/Project
Manager/Options the "Main form" setting is blank.   AND, Any time I add a
new form to my project, it sets the "Main form" setting to this form, since
I have no other auto-create forms, and by default, when you add a new form,
it makes it auto-create automatically.

How do I fix this?  I'm running Delphi 3.

Thanks,
Jesse

 

Re:Project creating Main Form Twice


Quote
Jesse Castleberry wrote in message ...
>I've got a problem in several applications where it wants to create the
>MainForm twice in my .DPR file.  If I go to View/Project Manager/Options, I
>can make sure that my Main form setting is set to "MainForm", then when I
>View/Project Source,  I have   Application.CreateForm(TMainForm, MainForm)
>twice in the code.  So, I delete one, but if I go back to View/Project
>Manager/Options the "Main form" setting is blank.   AND, Any time I add a
>new form to my project, it sets the "Main form" setting to this form, since
>I have no other auto-create forms, and by default, when you add a new form,
>it makes it auto-create automatically.

Sounds like you're confusing the code that parses the dpr
when the Options dialog is created. (I had problems once
with {$IFDEF ...} directives in the dpr).

Can you post a chunk of code from the dpr file?

--
Jeremy Collins
Kansai Business Systems

Other Threads