日期:2014-05-16 浏览次数:20913 次
bool moveBottom = true;
private void button1_Click(object sender, EventArgs e)
{
if (moveBottom)
{
label1.Top += 50;
if (label1.Top > this.Height)
moveBottom = false;
}
else
{
label1.Top -= 50;
if (label1.Top < 0)
moveBottom = true;
}
}