C#闪屏

}

}
}

}

private void Form2_Load(object sender, EventArgs e)
{

}

if (count == 3)//三圈
{
this.Left = x;//窗体要停下到未有转此前的任务
this.Top = y;
count = 0;
timer1.Stop();//不转了
}

int x = 0;//记录窗体的原有地方
int y = 0;
private void button1_Click(object sender, EventArgs e)
{
//1、启动
x = this.Left;
y = this.Top;
timer1.Start();
}
//2用i来支配自个儿timer跑到相当点
int i = 0;
int count = 0;
//三、把持有的点定义出来
Point[] ps = { new Point(-10, 0), new Point(-7, -7), new Point(0,
-10), new Point(7, -7), new Point(10, 0), new Point(7, 7), new Point(0,
10), new Point(-7, 7) };

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}

this.Left = x + ps[i].X;
this.Top = y + ps[i].Y;
i++;
if (i == 8)
{
i = 0;
count++;

private void timer1_Tick(object sender, EventArgs e)
{
//肆、将窗体设置为第i个点的职责

相关文章