日期:2014-05-17 浏览次数:20853 次
private void Form1_Load(object sender, EventArgs e) { System.Windows.Forms.Timer t = new Timer(); t.Interval = 100; t.Tick += new EventHandler(t_Tick); t.Enabled = true; } void t_Tick(object sender, EventArgs e) { if (this.label1.Right < this.Width) { this.label1.Left += 10; System.Threading.Thread.Sleep(100); Application.DoEvents(); } else { ((Timer)sender).Enabled = false; } }