473,772 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best practice for splash screen

I am developing a small utility program that must perform a considerable
amount of 'background' or 'research' work before it can display any user
interface. In general it can take 3-15 seconds to perform all of the
work requured before we display any user interface. So we have
determined that the utility should have a splash screen to assure the
user that the program is executing and will provide results shortly.

I should also note that we are now using Visual Studio 2005 and the
utility is written in C#.

Obviously we do not want the splash screen displayed in the same thread
as the work that is being performed, since that leads to the standard
problems of the contents not being fully populated and not being
repainted if the window is obscured and uncovered once more.

So we are left with two basic approaches:

1. Display the splash screen in a second thread and perform the
initialization work in the main thread.

2. Display the splash screen in the main thread and launch the
initialization work in another thread.

The former requires a loop that makes calls to DoEvents() so that the
screen is refreshed in a timely manner. Since the main thread is in
control, it is much easier to collect the information from the
initialization thread and to control the splash screen thread.

The latter is a bit more awkward to envision, as the initialization
thread may be controlled from either the main thread itself or from
inside the splash screen form class (more obscure, but...). This
approach has the downside of making it a bit more difficult to retrieve
information from the initialization thread (but not too difficult) and
to determine when the initialization thread is complete.

Is there a best practice or standard model for this activity in managed
..Net utilities?

-ken
Jan 17 '06 #1
1 2255
Ken,

Why not use the VS2005 feature for that.

http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx

I hope this helps,

Cor
Jan 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6922
by: Bill | last post by:
Problem 1) Any ideas on how I would get a splash screen to appear for a certain amount of time when I open a database - it's to display a text based disclaimer message. I know about message boxes in VB but I don't my users having to click on an OK buttone each time this appears. Problem 2)
3
2260
by: andrewcw | last post by:
I implemented the simplest of splash screens ( static and on its own thread ). But it seem that when first called maybe 8 seconds elapsed before it showed up, the main form follows several seconds later. Naturally recalling the application, the response is adequate I have 10 classes in my project. Some small, none really huge. And another form public class frmQCLoader : System.Windows.Forms.For { private System.Windows.Forms.DataGrid...
1
3605
by: BillZondlo | last post by:
Can someone look at this and tell me why, when I call this from my main app, it displays fine (fades form in and out) but then before my main app displays, I see other dialog boxes flash monentarily on the screen and this delays the main app display? Here is the fade which I compile to a dll and call from my main app: using System; using System.Threading; using System.Timers;
14
6697
by: SStory | last post by:
I am trying to make a splash screen for my vb.net app. It is an mdi app. including the splash code produces wierd results. not inluding makes things fine. Also have tried loading the splash form from: * load event of main mdi parent
2
2109
by: Joe Cool | last post by:
Using VB in VS2005. 2005 has a new way to implment a spash screen that alleviates the need for hardly any code. But I have found that when a GUI that has a splash screen is run as a scheduled task, the splash screen (and no other screen) is displayed for the entire run of the application. How can I disable the spalsh screen just for when an app is run as a scheduled task?
0
1202
by: blue_nirvana | last post by:
I have a program that automatically checks for an updated version on the network and if it finds it, it retrieves the new version and restarts. I have a splash screen that has an animated gif picture with a message to let the user know it is searching for a newer version. This all works fine, but the gif picture does not move until after all the other code finishes. Below is how I'm using it: Dim frm as New Splash frm.ShowSplash(Me)...
5
6412
by: steve | last post by:
Hi All I have a form set as the splash screen in VB.net 2005 application properties How can I tell when it has or is closing, as I want to then run some licence checking code without the splash screen interfering with msgboxes which may need to be displayed if the licence is invalid or missing I have tried in the splash form's formclosing event but it does not fire
4
5222
by: Gaz | last post by:
I am having a bit of a problem getting my application to work properly. RIght here is my problem... WHen my C# windows app loads up the start form, i create a new thread and show the splash on the new thread and put the main thread to sleep until the splash screen has done the business, then i kill the new thread and start another to show the login and again put the main one to sleep. Problem i have is that my splash screen will show...
2
16016
by: Newbie | last post by:
Hi, In the application properties of my vb.net 2008 project I have set one of my forms to be the splash screen. How do I increase the time the splash screen is displayed for. It vanishs to quick,and I would like it to display for 4 seconds Thanks
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.