WinForm 程序在系统托盘显示
前言
有些程序在关闭或最小化的时候会隐藏在系统托盘中,双击或右击会重新显示,winform实现其功能很简单,这边就简单的介绍下。
实现
在winform实现托盘使用notifyIcon控件,如果加菜单的话再结合下contextMenuStrip控件,我们看下代码:
this.notifyIcon1.Icon = new Icon(@"H:\学习资料\C# 窗体应用程序\自练\实现系统托盘\ico\qq彩色.ico");
this.notifyIcon1.Visible = true;
this.notifyIcon1.Text = "在线";
只要设置这些属性就行了,然后添加双击事件:
private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Show();
this.Focus();
}
}
就这么简单,主要用Hide()和Show()方法隐藏和显示窗体,其他的东西可以自由扩展。
实现效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMMAAACICAIAAADVgshSAAAgAElEQVR4nO3deVxU5foA8Pd9j5V2b79udxHNvOaaW+6mqJALmnrT0jRLs1CD1EKGWZhBM4+apiji1tXM7rVbmoq5XCXNUsEFN4Z9F5XZh0UUAcEZZt7fH2eZM2fOGRCEAe88n+fDZ5gZJpRvz/O873sGAekNT0Ty9estMhMTkxMTU9Tq9OTkrLS03MzM/Nzcgvx83e3bgCRJmzeaNkiS/P3XX1tunvv99/NnzyZcuJB45UpacnJORsbN3FxAkmRNTY2VCQsTD5moZqKqqurBgwcPHjyorKysrKysqKgoLy8vLy+/f/9+WVlZWVmZp39ALSZIkgwMDm7R+c2OHfFnz8adOZNw4YL62rW8rCyvJA8ESZJVdnvLzd/i4z8KDp4bHPzP7dt///XXS/HxacnJXkkeCJIkjRgbMTZw0uia9maaRXZ8145Px8dPmTWLwnT98mWvJA8ESZIpRffTSx9k37fkVtryHthvVGE6HzTTzKvkp6EanzwbP2Ne8M8HD54/d84ryQNBkuThq7m/pOrib5VdMVquF9kTi3FLyiI6b5Xhdz4MjoqM/O3UqaaVFBsE3IZvdJ7NZrPZ8qJ9AQBBsTZbXrQvdWdetK/jcbcv5fwitTzJI0GS5Orv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f+Sa+RDyLXXMXm3HFu+KKv3FkEZW72Iwv2hVftCuu6Nt4p9wdX7Q7vui780WRJ02zduT/XZbSSZZMYdpzsah1n+kwYLOQpHAT83v+mEncKV32IeW8d48Y6EVZmJ4IE61AYjWJORjR0Ee2Eh2S6FCoDoYWIEkBCrkFP82FizJgcBKcdxG+fwL0nb3u+19f32buvJKW9DKp77RC32mF/u9f6Dt+oe+4XNdxue6lz3UdPtd2+FzD5ovLNO2XFbRfWtCOztvtIkRSdbud6pYPlcqbTOY7MpzKG23Db7QNv+Ejloo8l8z1UeS2lbOZw08Zm9l0SrPbSrP+5shMTmbQGUZn27CMtmEZPmHpdErSfSRpbakMTWsrSaXSR5LqI0nxkaS0C0ttJ3Fk+7CUF5nsIE15SZrcUZbSUZryd1nK32XJnWTJfmsz1313AvSYBids+3+JltFH958DFgAAAABJRU5ErkJggg==" alt="" />
程序下载:实现系统托盘.rar
转载自:https://www.cnblogs.com/xishuai/p/3556477.html
谢谢浏览!
WinForm 程序在系统托盘显示的更多相关文章
- Java应用程序使用系统托盘资源
要想使自己开发的Java SE项目运行在自己的电脑系统托盘上,这并不是什么难事,总共需要如下几步即可: 1.线判断一下,系统托盘是否可用,否则接下来的程序将不可避免的报出异常咯 2.获得一个Syste ...
- qt系统托盘显示、无主窗体
系统图盘是应用程序经常用到的一个控件,当应用程序需要长时间存在的时候,这个控件会变得非常有用,比如,窗口隐藏,显示,关于.关闭等接口都可以放在图盘中处理,今天与到一个问题,需求是这样的:只需要显示图盘 ...
- C#在高分屏上让窗体程序忽略系统的显示缩放
[STAThread] static void Main() { ) SetProcessDPIAware(); Application.EnableVisualStyles(); Applicati ...
- WP7系统托盘和应用程序栏
(一)系统托盘和应用程序栏系统托盘(1)显示系统级别的状态信息(2)Apps能隐藏和显示系统托盘Micosoft.Phone.Shell.SystemTray.IsVisible=true;应用程序栏 ...
- C# winForm程序开机启动和托盘显示 (转http://blog.csdn.net/xinyue3054/article/details/6599508)
这段时间一直进行cs项目,故整理下开机自动运行.托盘.显示.隐藏. (1).在窗口上点击关闭按钮或者最小化时将托盘显示: (2).双击托盘图标显示窗口: (3).右键点击托盘图标提供三个菜单选项,“退 ...
- Winform设置托盘程序,托盘显示
1.拖一个NotifyIcon,一个ContextMenuStrip控件到主窗体中 2.设置notifyIcon1,一个contextMenuStrip1(如下图) Icon为托盘图标,Text托盘显 ...
- 小菜学习Winform(七)系统托盘
前言 有些程序在关闭或最小化的时候会隐藏在系统托盘中,双击或右击会重新显示,winform实现其功能很简单,这边就简单的介绍下. 实现 在winform实现托盘使用notifyIcon控件,如果加菜单 ...
- C# WinForm窗口最小化到系统托盘
* C# WinForm窗口最小化到系统托盘http://hi.baidu.com/kfxtgtqyapouyze/item/8ccfdcd5a174a7312a35c7c3 主要功能:(1).程序启 ...
- .Net程序随系统开机启动(仿Foxmail托盘效果控制)
对于使.NET程序随系统开机启动,最常用的可能就是向在注册表中注册开机启动项,或是建立Windows服务,使程序随系统启动而启动.这里以WinForm程序为例,测试Demo分享,同时附上对于程序托盘的 ...
随机推荐
- jquery 图片缩放插件使用
https://cdn.bootcss.com/d3-transition/1.1.1/d3-transition.js http://www.jq22.com/jquery-info9291
- 用redis-dump工具对redis集群所有数据进行导出导入
安装redis-dump redis-dump是基于ruby开发,需要ruby环境,而且新版本的redis-dump要求2.2.2以上的ruby版本,centos中yum只能安装2.0版本的ruby. ...
- Redisson实现分布式锁(1)---原理
Redisson实现分布式锁(1)---原理 有关Redisson作为实现分布式锁,总的分3大模块来讲. 1.Redisson实现分布式锁原理 2.Redisson实现分布式锁的源码解析 3.Redi ...
- C# 校验并转换 16 进制字符串到字节数组
问题 最近在进行硬件上位机开发的时候,经常会遇到将 16 进制字符串转换为 byte[] 的情况,除了这种需求以外,还需要判定一个字符串是否是有效的 16 进制数据. 解决 字符串转 byte[] 的 ...
- vsto 以隐藏的方式打开一个excel 文件 并获得excel文件的缩略图
public byte[] GetExcelPictureFile(string filepath) { Workbook workbook=null; Microsoft.Office.Intero ...
- go-gtk环境配置
go-gtk环境配置(用于go的图形化界面) 弄了一天,终于把这个环境给搭建好了,差不多就是安装msys2->安装gtk的各个版本->安装mingw(我原来装有但不影响,因为重复了,环境变 ...
- JS中for,for...in,for...of以及foreach循环的用法
1.for()循环 // for循环的表达式之间用的是;号分隔的,千万不要写成, for (初始化表达式1; 判断表达式2; 自增表达式3) { // 循环体4 } 2.for...in索引遍历 va ...
- Add a Class from the Business Class Library 从业务类库添加类 (XPO)
In this lesson, you will learn how to use business classes from the Business Class Library as is. Fo ...
- HTML颜色名称大全
所有浏览器支持的颜色名称,所有现代浏览器都支持以下140种颜色名称(单击颜色名称或十六进制值,以将颜色视为背景颜色以及不同的文本颜色): 有关HTML颜色的完整概述,请访问我们的颜色教程. 颜色名称 ...
- QML::基本属性类型
QML基本属性类型