Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 20139, Threaded Splashscreen for Delphi

by Peter Below Email: Anonymous

Shows how to implement a splash screen running in a secondary thread
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 6.0  to 7.0 4055 downloads
Copyright: No significant restrictions

Size: 40,067 bytes
Updated on Sat, 07 Jun 2003 00:44:11 GMT
Originally uploaded on Sun, 01 Jun 2003 03:44:39 GMT
SHA1 Hash: CB129C66785E1904E1EE746574CD0924AA95740C
MD5 Hash: 234570E982AC414E92352F4284844803

    Explore the files in this upload

Applications frequently use a splash screen to entertain the user while the application performs some lengthy startup processing. If this processing prevents the main thread from processing messages the splash screen will not properly repaint, however, if other windows are dragged over it.

This can be solved by creating the splash screen in the context of a secondary thread. Since the VCL is not thread-safe this has to be done using pure API calls.

This posting provides a component that can be used to configure the splash screen from the main thread. The components Show method will then create a secondary thread which shows the actual window. The window can have a status bar to show messages in. The design-time behaviour of this component has not been tested, it is mainly intended to be created in code. The demo application provided shows how to do this, and how to use a genuine form as a template for the splash screen.

The demo has been tested with Delphi 6 and 7 only. To compile it with older versions you will have to modify the code: remove all references to the Variants unit, add Forms to the Uses clause of PBThreadedSplashscreenU.pas, define a missing Windows style constant (WS_EX_NOACTIVATE = $08000000;).

splashscreen (for keyword generation)

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04