如何用一个timer控制窗体移动?

解决方案 »

  1.   

    为什么要用timer控制窗体移动?
      

  2.   

    设定控件坐标,让然后在timer事件下,加减坐标值。窗体不能移吧。
      

  3.   

    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;
            }    }
    }