TIP: Click on subject to list as thread! ANSI
echo: delphi
to: RYAN POTTS
from: GARY WEINFURTHER
date: 1997-11-14 09:33:00
subject: Forms opening with App

Ryan Potts mentioned this to Rolf Blum:
 RP> Instead of having
 RP> Var
 RP>    Form1 : tForm1;
 RP> In the interface I delete that and replace it with a prototype procedure
 RP> or function ie:
 RP> procedure ThisIsMyForm;
 RP> Then at the top of the implementation section I have the following
 RP> procedure/function:
 RP> procedure ThisIsMyForm;
 RP> begin
 RP>   with tForm1.create(nil) do
 RP>     try
 RP>       Showmodal;
 RP>     finally
 RP>       free;
 RP>     end;
 RP> end;
Thanks for posting that example, Ryan.  I often do it that way, too.  You may 
want to pass the owner as a parameter instead of using nil.  That way, the 
form will get freed when its owner is destroyed.  Alternatively, you can pass 
Application as the owner.
                                ...Gary
--- GoldED 2.41
---------------
* Origin: Nobody expects the Flying Circus BBS! (1:2410/905)

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™.