.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Timer usage in the form application

Posted By: Asha.MP     Posted Date: December 05, 2010    Points:2   Category :ASP.Net
Hi..

I need to display circles with the colors in the time interval of 5 sec means, Initially it should display red colot circle with the name red and after 5 sec it should display blue with the name blue,
any one know how to do this??
(I think we need to use timer)

Responses
Author: krishana singh             
Posted Date: December 07, 2010     Points: 5   

public partial class frmSplashScreen : Form
{
int a = 0;
public frmSplashScreen()
{
InitializeComponent();
}

private void frmSplashScreen_Load(object sender, EventArgs e)
{
timer1.Start();
}

private void timer1_Tick(object sender, EventArgs e)
{
a = a + Convert.ToInt32(timer1.Interval.ToString());
lblprocess.Text = lblprocess.Text + ".";
if (a > 3000)
{
timer1.Stop();
this.Hide();
frm_login a1 = new frm_login();
a1.ShowDialog();
}
}
}



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend