Title: lost your MainForm?
Question: When you go to "Projects", "Options", on the Delphi menu (having a project opened), it opens a kinda project properties dialog and the default tab is "general", that's where you set your MainForm... but... has it ever happened to you that the MainForm that you want is not an option on the Main Form drop dow list?
Answer:
a few days ago that happened to me... I could not set the Form that I wanted as my MainForm, the solution is so stupid... =oP... it is... I'll show you
usually if you open your project source ("Project", "View Source"), it looks some like this:
Program myproject;
uses
Forms,
myMainFormu in 'mymainformu.pas' {MainForm},
mysecondaryformu in 'mysecondaryformu.pas' {SecondaryForm},
AnotherFormu in 'anotherformu.pas' {AnotherForm};
begin
Application.Initialize;
Application.CreateForm(TmyMainForm, myMainForm);
Application.CreateForm(Tmysecondaryform, mysecondaryform);
Application.CreateForm(TAnotherForm, AnotherForm);
Application.Run;
end.
...that's a regular project and everything would work fine... go to "Project", "Options" and you can set any of the 3 forms to be MainForm... now if you change this (on the third line of the project)
myMainFormn in 'mymainform.pas', {MainForm}
now, go to "Project", "Options"... is gone!... do you see what I changed?
I just changed the ","... instead of
'mymainform.pas' {MainForm},
I changed to
'mymainform.pas', {MainForm}
the same happens if you remove the {MainForm} as:
'mymainform.pas',
so the solution, whatever you did, either changed the comma or removed the comment, just make sure that you have this format:
myMainFormu in 'mymainformu.pas' {MainForm},
and you'll be able to put that as MainForm
maybe this is documented somewhere... this happened to me and I couldn't figure it out, 'til I just saw that that was the only difference with the other forms on the project source, changed it to look as the others... and fixed it =o)
and so I thought I would share my experience with you...
this happened using:
Delphi5 UpdatePack 1
keep up coding
salu2
EberSys