Click here to Skip to main content
15,904,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am using C#.net 3.5, I am Desiging A Splash Screen for my Applications.
I Want to have some label with Transitions (Like Microsoft OFfice 2010 Splash Screen) to Display Current status while Starting the application..

You can find a sample image here ^[]

The behaviour of label on the splash screen is the labels come from bottom till middle half of screen. I tried to design it, by setting its location but cant get SMOOTH Transitions...

Can you suggest any Idea?


Prathamesh
Posted
Comments
[no name] 4-Aug-11 11:08am    
Show your code.

You did not show your code. Probably the solution is simple: you need to enable DoubleBuffering for the form where you render your graphics. If this is a control other than form, you will need to use Control.SetStyle and add the following System.Windows.Forms.ControlStylesBits: System.Windows.Forms.ControlStylesBits.OptimizedDoubleBuffer | System.Windows.Forms.ControlStylesBits.AllPaintingInWmPaint; as this method is protected, you can do this only in a class derived from Control.

Now, for transition you should better use a separate thread (BackgroundWorker will do well) with System.Threading.Thread.Sleep call in the cycle, to get some delay. As transitions go, every time you need to re-render the picture, call Control.Invalidate, optionally with a parameter (Rectangle or Region) to optimize it by re-rendering only the part of the scene.

You cannot call anything related to UI from non-UI thread. Instead, you need to use the method Invoke or BeginInvoke of System.Windows.Threading.Dispatcher (for both Forms or WPF) or System.Windows.Forms.Control (Forms only).

You will find detailed explanation of how it works and code samples in my past answers:
Control.Invoke() vs. Control.BeginInvoke()[^],
Problem with Treeview Scanner And MD5[^].

See also more references on threading:
How to get a keydown event to operate on a different thread in vb.net[^],
Control events not firing after enable disable + multithreading[^].

—SA
 
Share this answer
 
Possibly use a stopwatch to start when something new happens, then with every tick it moves the words up until a certain spot. That way you can make it move however much as you want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900