Mark R. Johnson (in a Web how-to article) has pointed out an undocumented
feature of TApplication, namely that the Main Form is simply the first one
created. Hence you can change which form is the main form by fiddling with
the code in the .DPR file. Others may find uses for this trick ...
begin
if (ParamCount > 0) and (UpperCase(ParamStr(1)) = '/S') then begin
{ScrnFrm needs to be the Main Form.}
Application.CreateForm(TScrnFrm, ScrnFrm);
Application.CreateForm(TCfgFrm, CfgFrm);
end else begin
{CfgFrm needs to be the Main Form.}
Application.CreateForm(TCfgFrm, CfgFrm);
Application.CreateForm(TScrnFrm, ScrnFrm);
end;
Application.Run;
end.
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)
|