473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Splash Screen Problems

Hi,

I am currently writing a GUI which requires a splash screen in C#, the form
itself has a Graphic (Inside a picture box) and 2 labels on it, when i show
it using the following the form soesnt display right.....
The splash screen loading even which contains this code is being fired bfore
the load event of the MDI Form, i dont know if that is what is causing the
problem

frmSplash frmSplash;
frmSplash = new frmSplash();
frmSplash.Show();
Thread.Sleep(2500); // two and half seconds splash screen will be displayed.
frmSplash.Close();
Activate();

Many Thanks in advance
Stuart Ferguson
Nov 16 '05 #1
2 1847
Hi Stuart,
I am currently writing a GUI which requires a splash screen in C#,
the form itself has a Graphic (Inside a picture box) and 2 labels on
it, when i show it using the following the form soesnt display
right.....
The splash screen loading even which contains this code is being
fired bfore the load event of the MDI Form, i dont know if that is
what is causing the problem


Splash-Screen is usually loaded before the Application.Run()-Call (in the
Main()-Method of your Application). You should probably Insert an
Application.DoEvents() - call before sending the thread to sleep ...

=================
FrmSplash frm = new FrmSplash();
frm.Show();
Application.DoEvents();
Thread.Sleep(2500);
frm.Close();

Application.Run( new Form1() );
=================

Regards,

Frank Eller
Nov 16 '05 #2
Cheers M8 that fixed my problem

:)

Stuart

"Frank Eller [MVP]" <fe******@frankeller.de> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
Hi Stuart,
I am currently writing a GUI which requires a splash screen in C#,
the form itself has a Graphic (Inside a picture box) and 2 labels on
it, when i show it using the following the form soesnt display
right.....
The splash screen loading even which contains this code is being
fired bfore the load event of the MDI Form, i dont know if that is
what is causing the problem


Splash-Screen is usually loaded before the Application.Run()-Call (in the
Main()-Method of your Application). You should probably Insert an
Application.DoEvents() - call before sending the thread to sleep ...

=================
FrmSplash frm = new FrmSplash();
frm.Show();
Application.DoEvents();
Thread.Sleep(2500);
frm.Close();

Application.Run( new Form1() );
=================

Regards,

Frank Eller

Nov 16 '05 #3

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

Similar topics

2
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...
1
by: Ken Allen | last post by:
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...
5
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...
3
by: steve | last post by:
Hi All I have a VB.net 2005 App which has a form set as the Application splash screen in Project properties Another form is set as the startup form All works great until the splash screen...
0
by: Steve | last post by:
Hi All I have an odd thing happening with my splash screen form The splash screen is set in Project properties and in the 'new' event of the splash form I run some code (before the...
2
by: will_456 | last post by:
In vb2005 Express: In My Project Application Splash Screen I have selected my splash screen form. The form opens on project startup but closes immediately before anyone would have time to read...
10
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show...
0
by: Tony K | last post by:
I happen to be reading a Q&A in my VS Magazine this month and there was a tidbit about how to make the splash screen display longer. Fit one of my problems perfectly, but... The MDI form shows up...
4
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.