TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: BRYAN SMITH
date: 1997-01-03 01:54:00
subject: Changing which form is your MainForm

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.