2个回答
展开全部
public bool alreadyshow = false;
int i = 0;
private void timer2_Tick(object sender, EventArgs e)
{
if (i < 1000)
{
if (alreadyshow)
{
this.Left += 5;
this.Top += 5;
alreadyshow = false;
}
else
{
this.Left -= 5;
this.Top -= 5;
alreadyshow = true;
}
i++;
}
else
{
}
}
int i = 0;
private void timer2_Tick(object sender, EventArgs e)
{
if (i < 1000)
{
if (alreadyshow)
{
this.Left += 5;
this.Top += 5;
alreadyshow = false;
}
else
{
this.Left -= 5;
this.Top -= 5;
alreadyshow = true;
}
i++;
}
else
{
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询