using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = DateTime.Now.ToShortTimeString();
}
private void label1_Click_1(object sender, EventArgs e)
{
}
}
}
c#
最新推荐文章于 2023-08-09 17:32:38 发布
本文介绍了一个简单的 C# Windows Forms (WinForms) 应用程序实例,演示了如何创建窗体并响应按钮点击事件来显示当前时间。
5973

被折叠的 条评论
为什么被折叠?



