Alan Colburn wrote:
> I recently redecorated the GUI on an application to have the
> Vista/Office 2007-style ribbon UI, using TMS's components. It looks
> great and works fine. However, the resulting DFM file is large and
> slows the application's startup time quite noticeably--there is a
> delay of several seconds in between the time the splash screen
> disappears and the main form appears.

Sounds like you're hiding the splash screen and showing the main form in 
the wrong order. The splash screen is supposed to distract from the fact 
that your program takes a long time to appear, but if you hide it before 
your program appears, it hasn't really done its job.

> Is there anything I can do to
> reduce the DFM file size or otherwise eliminate this delay, short of
> deleting images and components?

If you really think the delay is due to the _size_ of the DFM resource, 
then it could only be because of the extra time spent parsing the 
contents of the resource, to convert the data into class names to 
instantiate and property values to assign.

You could skip all that by creating the components via code directly. I 
think the JCL comes with an add-in for exactly that -- select a bunch of 
components, copy them to the clipboard, and use the add-in to generate 
code that will replicate those components in code. I'm not sure how that 
took deals with images, though. You could store the images in a real 
image resource instead of a DFM resource.

Every step you take away from using the DFM is a step away from using 
the visual designer.

Note that although the DFM is probably stored as text in your source 
folder, the compiler converts it to the binary DFM format before linking 
it to the EXE. The binary format should be considerably smaller. You can 
use the convert.exe program included with Delphi to confirm that for 
yourself.

-- 
Rob
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to