Code Heaven For C# Developer

Tuesday, February 15, 2011

Make Moving text in Window like web.

For this purpose i am going to take a label for showing text and timer control.Set label text as "Catch me if you can" like the snap atttatched.



on timer_tick event i write the following code..

private void timer1_Tick(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder(label1.Text);
string str = label1.Text;
sb.Append(str[0]);
sb.Remove(0, 1);
label1.Text = sb.ToString();
}

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home