moving controls at runtime
Posted: Sun Nov 20, 2011 9:49 pm
ok so i have this
what im trying to do is make the label move back and forth
and i use .left because sources say one can't use .location.X
Code: Select all
but it doesnt workprivate void timer1_Tick(object sender, EventArgs e)
{
Point extended = new Point(385, 535);
Point normal = new Point(417,535);
if(label1.Location == extended)
{
label1.Left += 1;
}
if (label1.Location == normal)
{
label1.Left -= 1;
}
}
what im trying to do is make the label move back and forth
and i use .left because sources say one can't use .location.X