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