http://embarcadero.newsgroups.archived.at/public.delphi.vcl.components.using/200904/0904161856.html
Sometimes, an application requires to show a form before the Mainform. This following code shows how to create and show a form (DialogSelectLanguage) before Mainform (FornMain) is show.
Notice: DialogSelectLanguage should be moved to < Avaliable forms > ( [Project] [Options...] [Form] )
int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
Application->Initialize();
// Create a form before Mainform is creacted.
DialogSelectLanguage = new TDialogSelectLanguage(Application); // Show the form
DialogSelectLanguage->ShowModal();
...
...
DialogSelectLanguage->Release(); // If needed
DialogSelectLanguage=NULL;
// Create Mainform Application->CreateForm(__classid(TFormMain), &FormMain);
Application->Run();
return 0;
}
No comments:
Post a Comment