C#窗体移动
如何用一个timer控制窗体移动? --------------------编程问答-------------------- 为什么要用timer控制窗体移动?--------------------编程问答-------------------- 设定控件坐标,让然后在timer事件下,加减坐标值。窗体不能移吧。 --------------------编程问答--------------------
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Timer t = new Timer();
t.Interval = 500;
t.Tick += new EventHandler((s, e) => { Top+=5; Left+=5; });
t.Enabled = true;
}
}
}
补充:.NET技术 , C#