Hi All,
I have a loading routine from my program where I need to read in large amounts of data from files, process that data and then finally load UI forms.
Currently I show a static splash screen while I'm running these loads on the UI thread. However, I'd like to load this data on a separate thread and show a progress bar that updates and shows animation (so the users don't think the program is stuck.)
I know I could run a background worker thread to do this work, but I'd like a little more control/structure (i.e. not having to do work, have handle an event to call a new sub routine, etc, just seems messy).
Is it at all possible to do the following? (mostly interested in how steps 3, 5 could execute but still allow UI animation to run)
This just seems to have a better flow rather than the following:
Any way to do this?
Thanks,
Nick
I have a loading routine from my program where I need to read in large amounts of data from files, process that data and then finally load UI forms.
Currently I show a static splash screen while I'm running these loads on the UI thread. However, I'd like to load this data on a separate thread and show a progress bar that updates and shows animation (so the users don't think the program is stuck.)
I know I could run a background worker thread to do this work, but I'd like a little more control/structure (i.e. not having to do work, have handle an event to call a new sub routine, etc, just seems messy).
Is it at all possible to do the following? (mostly interested in how steps 3, 5 could execute but still allow UI animation to run)
Code:
* Pseudo code*
Main Program
1- Load Animated Splash Screen
2- Start parallel thread to load a file.
3- Wait here until parallel thread is complete *but* does not stall UI thread.
4- Start parallel thread to process files.
5- Wait here until parallel thread is complete *but* does not stall UI thread.
6- Close Animated Splash Screen
7- Open Main Form(s)
* End Pseudo code*Code:
* Pseudo code*
Main Program
1- Load Animated Splash Screen
2- Run back ground worker thread to do all work
*Event Background thread complete* - Loads UI forms
* End Pseudo code*Thanks,
Nick