首先添加控件
我们只需要这两个就够了
然后是代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 时钟
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
label1.Text = DateTime.Now.ToString()
}
}
}
这样就完成了
当然还可以在修饰修饰 就看自己了
自己做了一个时钟小软件,方便录屏的时候显示时间,或者其他用途。
就这么大。
链接:https://pan.baidu.com/s/1jbImTY0h_5Cy175mLm57IQ
提取码:pao4