Search code examples
windowsperformancesplash-screenlauncher

writing fast launcher for windows


I'm writing WPF application

application targets all sort of windows and low performance computers so I want to write launcher/splash screen for it which will be displayed before application loads

I'm not sure what language to use or what technology I want it to be very fast and lightweight

can you suggest anything ?


Solution

  • Displaying a flash screen is as easy as popping up a dialog. If the dialog has the various resources such as bit maps already included then it is quite fast. However one issue that will determine this speed is how much other stuff is being initialized at application startup before the code is hit to display the dialog.

    So one option would be to have a very simple application that does nothing more than display the flash screen and then start up the actual application. A simple Windows dialog application would do that. You would need to figure out how to synchronize the actual application finishing its initialization and the launching application stopping if you choose this route. There are several techniques for this and the most likely would be to use an interprocess mutex or perhaps just look for a file to be created.

    For a point of sale I work with that is launched as part of turning on the terminal we ran into problems in which the application would start before some required system services such as database manager were up and running.

    We have found that some environments require much more time than others so a registry variable makes it easy to tweak the delay in the field.

    So as part of the application initialization what we did was that when the application starts up, it displays a dialog with a progress bar. The progress bar does a count up and we have a loop that does a one second sleep then increments the progress bar.

    The number of seconds to wait is a registry setting for the application with a default value.

    One problem we ran into was that when doing development and testing in a debugger, the default value was way too long for impatient programmers wanting to get started so we have condition compile so that if it is a debug compile, the delay is set to a couple of seconds. Otherwise the default is 10 seconds. However it can be changed with a change in the registry value.

    See also this Stackoverflow about a launcher.