- C# code
public partial class Form1 : Form { int i = 0; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { timer1.Enabled = true; timer1.Interval = 1000; } private void timer1_Tick(object sender, EventArgs e) { i++; MessageBox.Show(i.ToString()); if (i >= 5) timer1.Enabled = false;//timer停止 } }
为什么它就停不掉?MessageBox.Show还有这功能?
------解决方案--------------------
你自己看看你的代码,真是服了你了!
------解决方案--------------------