Label Movement Left to Right
Add one button, timer and 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);
}
Now go to the button1 click event and copy the following code.
private void button1Click(object sender, EventArgs e)
{
timer1.start();
}
No comments:
Post a Comment