关于显示时间
private void InitializeTimer()
{
// Call this procedure when the application starts.
// Set to 1 second.
timer1.Interval = 1000;
timer1.Tick += new EventHandler(timer1_Tick);
// Enable timer.
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
label4.Text = System.DateTime.Now.ToString("H:M");
}
按我的设想应该是label4显示当前时间。
结果label4根本不变。
private void label4_Click(object sender, EventArgs e)
{
label4.Text = System.DateTime.Now.ToString("H:M");
}
我又写了这样一句,结果一点它就显示了。
求教哪里出问题了