Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Ok, so im creating an WPF app and i have a splash screen.

I'm putting a progress bar on the spash screen and a timer so the next windows shows when the timer ends.

But because visual studio 2012 doesn't have a timer tool i cannot do it.

Anyone have a way to do it?
Posted
Updated 3-Feb-14 3:02am
v2
Comments
Sergey Alexandrovich Kryukov 2-Feb-14 12:47pm    
There is not such thing as "timer in Visual Studio"... :-)
The question simply makes no sense. Showing a splash screen is not a problem at all, as well as setting timing for it; it has nothing to do with Visual Studio, which is nothing but IDE.
—SA

WPF uses DispatcherTimer.

C#
System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0,0,1);
dispatcherTimer.Start();


private void dispatcherTimer_Tick(object sender, EventArgs e)
{
  //Timer code goes here
}
 
Share this answer
 
The question does not really make sense — please see my comment to the question.

Please see this CodeProject article, for example: Implement Splash Screen with WPF[^].

—SA
 
Share this answer
 
Use a DispatcherTimer[^].

/ravi
 
Share this answer
 
This doesn't make any sense.
Still you can use dispatcher timer or even Thread as well.
Apart from all this, an awesome article[^]..!!!

:)
 
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