473,799 Members | 3,132 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Quick Pop-up Splash Screens

I have some applications that are slow loading and some of my users keep
clicking away until they see something.

Can anybody point me to some examples of quick loading splash screens and
tips on tweaking up the load speed of an application?
Any help is greatly appreciated.
Nov 17 '05 #1
5 1906
Greg,

You will need to be more specific about tweaking up the load speed of an
application. What is it that you are doing in your app on startup that is
causing the long load time? It's a very general question, to say the least.

Also, if you want a splash screen, you are going to have to move
whatever processing you are doing before your window loads to another
thread, so that the splash screen can repaint itself properly if needed (you
don't need it to move or anything like that, but it won't repaint itself
properly if you don't process the message loop, something you can't do if
your processing is occuring on the UI thread).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Greg Smith" <gj*@umn.edu> wrote in message
news:OO******** ******@TK2MSFTN GP09.phx.gbl...
I have some applications that are slow loading and some of my users keep
clicking away until they see something.

Can anybody point me to some examples of quick loading splash screens and
tips on tweaking up the load speed of an application?
Any help is greatly appreciated.

Nov 17 '05 #2
Hi,

Do a search in google for "splash screen" you will find several solutions,
below is the code I use.
public class splash : System.Windows. Forms.Form
{
private System.Windows. Forms.PictureBo x pictureBox1;

DateTime time;
public splash()
{
//
// Required for Windows Form Designer support
//
InitializeCompo nent();

//
// TODO: Add any constructor code after InitializeCompo nent call
//
Show();
time = DateTime.Now;

Application.DoE vents();
}

public void CloseIt()
{
TimeSpan T = DateTime.Now - time;
if (T.Milliseconds <3000)
System.Threadin g.Thread.Sleep( 3000-T.Milliseconds) ;
this.Close();
}
}

// In the main form:

static splash splashform;

[STAThread]
static void Main()
{
splashform = new splash();
Application.Run (new Form1());
}

public Form1()
{
try
{

DataProvider.Pr eLoadData();
splashform.Clos eIt();

}
catch( Exception e)
{
MessageBox.Show ( e.Message + " In Main ");
}
}
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Greg Smith" <gj*@umn.edu> wrote in message
news:OO******** ******@TK2MSFTN GP09.phx.gbl...
I have some applications that are slow loading and some of my users keep
clicking away until they see something.

Can anybody point me to some examples of quick loading splash screens and
tips on tweaking up the load speed of an application?
Any help is greatly appreciated.

Nov 17 '05 #3
Hi,

Regardign the code, I do not need the refresh the UI, if you need so you
have to use a thread , and then you do not need the Application.DoE vents()
call
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Nov 17 '05 #4
Thanks for the info.

I am chrashing on:

DataProvider.Pr eLoadData();

What namespace is that in?

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hi,

Regardign the code, I do not need the refresh the UI, if you need so you
have to use a thread , and then you do not need the Application.DoE vents()
call
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Nov 17 '05 #5
Hi,
Mine :)

You are not crashing there, it does not compile, that's the method that
load the data in my app while the client sees the splash
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Greg Smith" <gj*@umn.edu> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Thanks for the info.

I am chrashing on:

DataProvider.Pr eLoadData();

What namespace is that in?

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >
wrote in message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hi,

Regardign the code, I do not need the refresh the UI, if you need so you
have to use a thread , and then you do not need the
Application.DoE vents() call
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


Nov 17 '05 #6

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

Similar topics

6
23206
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the entire word?
15
4167
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: struct node { struct node *next; void *data; };
30
1956
by: Christopher Benson-Manica | last post by:
Given the following: char s="Hello, world\n!"; Are all the following guaranteed to produce the same output? printf( "%s", s ); fprintf( stdout, "%s", s ); fwrite( s, sizeof(char), sizeof(s)/sizeof(char) - 1, stdout );
25
4205
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a misnomer or what? From the literature, pop is supposed to be an operation defined for a stack data structure. A stack is defined to be an "ordered" list data structure. Dictionaries in Python have no order but are sequences. Now, does anyone know...
7
24941
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element of a list and return its value: Now I know list is a bad name, but for the sake of arguement lets assume its not a built in sequence> 'example'
0
9685
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
9538
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
10470
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...
0
10247
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10214
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
9067
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...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
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

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.