日期:2014-05-16 浏览次数:20900 次
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;
}
}