0

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 ?

MySqlError
  • 620
  • 8
  • 20

2 Answers2

1

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.

Community
  • 1
  • 1
Richard Chambers
  • 16,643
  • 4
  • 81
  • 106
  • will .NET windows forms application fast enough to show up quickly on slower machines ? will .NET winform app faster in C++ than in C# ? – MySqlError Oct 19 '12 at 12:56
  • my minimal target is windows xp service pack 2 and machines that can run it – MySqlError Oct 19 '12 at 13:00
  • I do not have any performance data on .NET applications. There would be several variables including storage access time (disk access, network, or other). In general the smaller and more self contained the application, the quicker it will load and run. I do know that a simple MFC dialog application in C++ is fast so if you go with the independent launcher that would be fast. I suspect that with the .NET platform, it would be slower unless the various DLLs and components that are shared are already in memory. – Richard Chambers Oct 19 '12 at 14:33
0

If you want something realy fast and lightweight, C would be nice.

If you dont want to learn C, you can also make a console application with .NET and C# it's fast too

Edit for comment: You can use a library like SDL wich is very fast and powerfull, and can draw images from a console application.

Jonathan Muller
  • 7,348
  • 2
  • 23
  • 31
  • I want to show something before application loads are you suggesting console window ? I know C is fast but what technology should I use ? directly win api? – MySqlError Oct 19 '12 at 12:24
  • You can do it quite easily with SDL library that can show images very fast – Jonathan Muller Oct 19 '12 at 12:31
  • Not sure of your development IDE however if it is Visual Studio, doing a windows launcher should be a matter of creating a simple dialog application which displays a dialog and then launches the actual application. A simple dialog application is just a few mouse clicks through a series of wizard dialogs. then you add a flash screen dialog with its class, use the IDE tools to make it pretty, and then in your init you just display the flash dialog, launch the application, and once it is running, close the flash dialog and exit the launcher. – Richard Chambers Oct 19 '12 at 14:39