WinForms 在控件中显示当前时间,并且秒数在动
来源:百度知道 编辑:UC知道 时间:2024/05/24 17:30:24
WinForms 在控件中显示当前时间,并且秒数在动
请教下
请教下
加个timer1,button1
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
button1.Text = Convert.ToString( DateTime.Now);
}
}