private void timer1_Tick(object sender, System.EventArgs e) { Point p = new Point(this.DesktopLocation.X + 1, this.DesktopLocation.Y); this.DesktopLocation = p; if (p.X == this.DesktopBounds.Width) { Point p2 = new Point(0,370); this.DesktopLocation = p2; } } private void Form1_Load(object sender, System.EventArgs e) { Point p = new Point(0,370); this.DesktopLocation = p ; }给你个类似的例子,利用TIMER控件
{
Point p = new Point(this.DesktopLocation.X + 1, this.DesktopLocation.Y);
this.DesktopLocation = p;
if (p.X == this.DesktopBounds.Width)
{
Point p2 = new Point(0,370);
this.DesktopLocation = p2;
}
} private void Form1_Load(object sender, System.EventArgs e)
{
Point p = new Point(0,370);
this.DesktopLocation = p ;
}给你个类似的例子,利用TIMER控件