Splash Screens

The computer at my current job is pretty slow and compiling the WinForms application we are developping not only takes forever to compile but to load as well since there are so many asm files to be loaded.
I decided to write up a nice splash screen for the application which will show the current asm being loaded. There is a lot of resources on the net however I found this to be the best article . Other people were placing the splash screen on the same thread or using it to report on initializatoin of the actual application whereas I was looking to have a splash just for the asm loading.
I had initially started with a really stripped version of my current implementation seeing a lot of what the original poster had done as being too complicated. However I either rushed my implementation or it wasn’t explained properly the reasons behind certain code choices.

One issue of the code I was confused about was the Invoke() and delegate creation for something as simple as setting the Controls.Text proprety. It was interesting learning how a Control’s propery are thread locked which after reading a bit seems to be a feature added in 2.0. The Invoke() command executes the method on the thread that created the Control. The result of using the delegate in this manner is thread-safe UI modifications. Pretty neat feature, otherwise might have needed to add Locks to the property for thread safety.

Things I would like to add to my splash screen:
I was looking into not only adding a label of the asms’ being loaded but displaying a progress bar. I was wondering if it’s possible to build the asm reference list of asms to be loaded so that upon each load I can make an accurate step in the progress bar.

Leave a Reply

Your email address will not be published. Required fields are marked *