Jump to content

which form loads first, and why?


gordon

Recommended Posts

ive got an app running fine.. no trouble.. but Im a little confused about something.

 

I took my mainform, and renamed it to loginform.. Loginform is the first form that loads.. my question is, why is that? where is the code that tells that form to load first?

 

I changed the creation order in the project, that didnt affect anything.. All unigui forms seem to have been derived from the same class etc. so what makes that first form different, and where in code does it tell it to load that one first at startup?

 

Gordon

Link to comment
Share on other sites

ive got an app running fine.. no trouble.. but Im a little confused about something.

 

I took my mainform, and renamed it to loginform.. Loginform is the first form that loads.. my question is, why is that? where is the code that tells that form to load first?

 

I changed the creation order in the project, that didnt affect anything.. All unigui forms seem to have been derived from the same class etc. so what makes that first form different, and where in code does it tell it to load that one first at startup?

 

Gordon

 

You have to add this line in the form you want to be the main form and remove it form tha actual mainform:

 

initialization

RegisterMainFormClass(TfrmMY_MAIN_FORM);

Link to comment
Share on other sites

You have to add this line in the form you want to be the main form and remove it form tha actual mainform:

 

initialization

RegisterMainFormClass(TfrmMY_MAIN_FORM);

ahh, I see it now.. makes sense now.. thank you..

 

Gordon

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...