TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ROLF BLUM
from: DEREK GRAINGER
date: 1997-11-15 02:49:00
subject: Re: Forms opening with App

 Hi Rolf,
 Rolf Blum wrote to Derek Grainger about Re: Forms opening with App
 GW>>> Only the main form should be auto-created.  All others should be
 GW>>> explicitly created in code.
 RB> Why that? so far I allways created all Forms automatically without any  
 RB> drawback. May me you could give me some hints on the andvantages.
 RB> If I create them in code, does this mean I cannot anymore design them in 
 
 RB> the IDE?
 My original problem was that a dialog in my application was being shown
 as well as the main application form when the application was run. Gary
 Weinfurther, God bless him ;-), stated that not creating the forms
 automatically may solve it. Other suggested benefits included reduced
 loading speed and the saving of many resources. These I have found to
 be true, the application used to take about 30 secs to start, now it's
 nearly instantanious(?), and the Win95 message that 90% of system
 resources are being used no longer appears.
 The forms *are* still created - ie designed - in the IDE, but they are
 removed from the auto-create list for the application. From the Main
 Menu, Project then Options. It's the first page. All you do to create
 the form when the application is running.
 Eg,  if the original command to show the form was
        Form1.Show;
      you just need to change the lines to
        Form1:=TForm1.Create(Self);
        Form1.Show;
      and in the form's OnClose event add the line
        Action:=caFree;
 It works really well and I can recommend it.
 Hope this helps,
 Regards,
 Derek.
 dsg@dhours.overflow.com
.!. Do what you will with this tagline, just don't bother me about it!
--- Terminate 4.00
(2:253/417.10)
---------------
* Origin: Did you see the size of those...JEEESSUUUUUUUSSSSSSS!

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