Label movement Right to left in c# visual studio
Add one button, timer and a label from the toolbox and then go to the timer1 tick event and copy the yellow highlighted code as follows.
private void timer1_Tick(object sender, EventArgs e)
{
label1.Location = new Point(label1.Location.X - 2, label1.Location.Y);
}
No go to the button1 click event and copy the code.
No go to the button1 click event and copy the code.
private void button1_Click(object sender, EventArgs e)
{
timer1.start();
}
No comments:
Post a Comment