StatusStrip控件的使用(转:http://blog.sina.com.cn/s/blog_4f18c3ec0100fguf.html)
实现效果: 通过StatusStrip显示窗体状态栏 同时将状态栏分成三部分 居左边显示相关文字信息 中间空白显示 居右边显示时间信息
1.创建窗体及添加StatusStrip 默认StatusStrip名称为statusStrip1
2.在statusStrip1的Items属性中 添加三个StatusLabel 默认名称为toolStripStatusLabel1,2,3 按1,2,3的顺序排列
3.修改toolStripStatusLabel1的Text属性 为相关文字如"欢迎使用本系统"
4.修改toolStripStatusLabel2的Text属性为空 Sprint属性为True BorderSides属性为Left,Right
5.修改toolStripStatusLabel3的Text属性为空 在Form的Load事件中 修改其显示为当前时间 this.toolStripStatusLabel3.Text = "登录时间:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
6.如果要使状态栏时间信息随操作系统当前时间不停的改变 则可以通过增加Timer控件来实现 增加Timer控件 timer1 编写其Tick事件为 private void timer1_Tick(object sender, EventArgs e) { this.toolStripStatusLabel3.Text = "系统当前时间:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); } 在Form的Load事件中 对timer1进行相关设置 private void MainForm_Load(object sender, EventArgs e) { this.toolStripStatusLabel3.Text = "系统当前时间:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); this.timer1.Interval=1000; this.timer1.Start(); }
StatusStrip控件的使用(转:http://blog.sina.com.cn/s/blog_4f18c3ec0100fguf.html)的更多相关文章
- 关于StatusStrip控件和StatusBar控件的小试
今天,在网上查找资料,突然看到一个例子,但例子中提及的StatusBar控件,我发现在vs控件压根不存在,我就郁闷了,于是上网查找才知道,现在这个控件已经被StatusStrip控件给吞了,Statu ...
- 解决statusStrip控件上的项目不能靠右对齐的问题
在c#中用到了状态栏控件StatusStrip,但当我想把StatusStrip上某个StatusLabel靠右对齐时出了问题. 按照MSDN中的办法,是设置ToolStripStatusLabel的 ...
- c# statusStrip控件(转)
先了解一下StatusStrip:首选StatusStrip是Form中的一个控件,同时也是一个大的控件,其中含有许多子控件,这些子控件存放在控件群中. 这样我们要使用StatusStrip时, 首先 ...
- .NET WinForm下StatusStrip控件如何设置分隔线及部分子控件右对齐
ssInfo.LayoutStyle = ToolStripLayoutStyle.StackWithOverflow;//StatusStrip 控件 tsslUpdate.Alignment = ...
- StatusStrip控件
态栏用于显示用户状态的简短信息. StatusStrip控件是由system.windows.forms.statusStrip类提供,作用是在应用程序中标识对话框底部的一栏,通常用于显示应用程序 ...
- http://blog.sina.com.cn/s/blog_4c3b6a070100etad.html
http://blog.sina.com.cn/s/blog_4c3b6a070100etad.html
- http://blog.sina.com.cn/s/blog_5bd6b4510101585x.html
http://blog.sina.com.cn/s/blog_5bd6b4510101585x.html
- quartus ii13.0~16.0 调用uedit (转载http://blog.sina.com.cn/s/blog_6d5560f00102vax6.html)
转自 http://blog.sina.com.cn/s/blog_6d5560f00102vax6.html Quartus II 中的文本编辑软件不好用,比较习惯与UE(Uedit32/ultra ...
- http://blog.sina.com.cn/s/blog_5f103c9c0101atny.html
http://blog.sina.com.cn/s/blog_5f103c9c0101atny.html http://www.oschina.net/question/117304_51525
随机推荐
- 对5月13号中BaseDao方法进行优化改造,更接近于框架的编写
/* * 通用查询.更新升级版 * */ public class BaseDao2 { static { try { Class.forName(ConfigUtil.getValue(" ...
- tomcat监控工具-probe
概述 今天给大家介绍一款开袋即食的性能监控工具,居家性能测试必备! tomcat监控工具:probe tomcat probe是一个开源的监控tomcat运行状态工具,可以实时查看项目运行的情况,监控 ...
- Sql注入基本思路
Sql注入基本思路 利用mysql自己动手 登录 使用show databases;查看数据库,sql注入主要用到的是information_schema这个库(mysql中大小写不敏感) infor ...
- JSP的工作原理
jsp的本质就是一个servlet,jsp在第一次被访问时会被Web容器翻译成servlet index.jsp -> index_jsp.java -> 编译成index_jsp.cla ...
- AOP通知类型
AOP通知类型 前置通知 在目标方法执行之前进行操作 后置通知 在目标方法执行之后 进行操作 环绕通知 在目标方法执行之前 和之后进行操作 public Object arount() 异常抛出通知 ...
- ESXi6.5上的Ubuntu虚机在远程SSH时宕机
情况是这样的, 有一个ESXi6.5上跑的Ubuntu虚机, 版本是18.04.1, 今天升级成18.04.2后, 就发现远程连接SSH不对劲, 在本地登录和操作都好好的, 只要远程SSH一连接, 服 ...
- 视频色彩空间RGB、YUV、YCbCr
RGB.YUV和YCbCr都是人为规定的彩色模型或颜色空间(有时也叫彩色系统或彩色空间).它的用途是在某些标准下用通常可接受的方式对彩色加以描述.本质上,彩色模型是坐标系统和子空间的阐述. RGB R ...
- leetcode 266.Palindrome Permutation 、267.Palindrome Permutation II
266.Palindrome Permutation https://www.cnblogs.com/grandyang/p/5223238.html 判断一个字符串的全排列能否形成一个回文串. 能组 ...
- 使用draw.io桌面版代替visio制作流程图
前言 draw.io是一款在github上的开源产品,由于需要构建在线文档,需要插入画图类型, 对比多款开源产品,最终选择了draw.io. draw.io图标资源非常的丰富,方便导入图标资源,基本上 ...
- [LeetCode] 337. House Robber III 打家劫舍 III
The thief has found himself a new place for his thievery again. There is only one entrance to this a ...