C#窗体设计:[29]状态栏的使用
1、新建一个C#应用程序,应用程序命名为StatusStripDlg。
![C#窗体设计:[29]状态栏的使用](https://exp-picture.cdn.bcebos.com/a99a494afa32939c79faf3065719ce2c5a1b15a1.jpg)
3、双击Timer控件为其添加响应函数timer1_Tick(),并添加一下代码。private void timer1_Tick(object sender, EventArgs e) { toolStripStatusLabel4.Text = DateTime.Now.ToLongTimeString(); }
![C#窗体设计:[29]状态栏的使用](https://exp-picture.cdn.bcebos.com/1f9feadca039131f90e1ff6de275f2c4ed990aa1.jpg)
5、程序运行如下,状态栏显示鼠标的位置还有当前的时间。
![C#窗体设计:[29]状态栏的使用](https://exp-picture.cdn.bcebos.com/edd84743040148fe784f71df8fd149299b8802a1.jpg)
1、新建一个C#应用程序,应用程序命名为StatusStripDlg。
3、双击Timer控件为其添加响应函数timer1_Tick(),并添加一下代码。private void timer1_Tick(object sender, EventArgs e) { toolStripStatusLabel4.Text = DateTime.Now.ToLongTimeString(); }
5、程序运行如下,状态栏显示鼠标的位置还有当前的时间。