如何在通知区域中运行应用程序 [英] How to run application in notification area

查看:141
本文介绍了如何在通知区域中运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个演示应用程序,并且想像防病毒软件,micromax数据卡软件或任何pther通知软件一样始终运行..


我的主要目标是
当我关闭应用程序时,我的应用程序可能会关闭,但它应该运行并显示在通知区域的图标中,例如gtalk,skypee等.

然后单击它,然后将打开应用程序窗口,并将其显示在任务栏中.

如何执行,请用代码和示例对其进行描述.

I have a created a demo application, and woluld like to run always like antivirus, micromax datacard software, or any pther notification software..


My Main objetive is
when i close an application then my application may close, but it should run and display in notification area icon like gtalk, skypee, etc.

and when it will click then the application window will open and display it in task bar.

how to do it please describe it with code and examples

推荐答案

string IconPath = @"C:\Users\Zaid\Desktop\Icon.ico";

            Icon icon = new Icon(IconPath);

            NotifyIcon notifyIcon = new NotifyIcon();

            notifyIcon.BalloonTipText = "Text";

            notifyIcon.Icon = icon;


嘿,您可以使用最小化窗口"之类的选项并转到系统托盘.
在这种情况下,您的应用程序已部分关闭(即在任务栏中不可见)

并通知您可以将其恢复..

有关最小化"和系统托盘"参考链接,---

1. 最小化系统托盘中的表单 使用Windows Hook最小化到系统托盘的任何窗口 [ ^ ]
Hey You can use option like Minimize window and go to system tray.
In this case you application is partially close(i.e. not visible in task bar)

And for notification you can restore it..

For Minimize and system tray reference links---

1. Minimize Form in System Tray

2. Minimize any window to system tray using Windows Hook[^]


这篇关于如何在通知区域中运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆