///1.拖出timer控件和label控件
///2.在timer1_tick中将系统时间赋值给label的text
///3.在form_load中开启控件
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace myclient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
label2.Text = System.DateTime.Now.ToString();
}
}
}