在启动时将应用程序隐藏到托盘栏中 [英] Hide application into traybar on startup

查看:222
本文介绍了在启动时将应用程序隐藏到托盘栏中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个Winforms应用程序,可在Windows启动时打开.但是,在这种情况下,我希望它保留在托盘栏中而不弹出.但是,如果用户启动它,它应该会弹出.我如何找出应用程序如何运行?是由用户还是由Windows自动?

谢谢
Cheers

Hi,
I have a winforms application that opens up on Windows startup. However in this case I would like it to stay in the traybar and not to pop up. But if a user starts it, it should pop up. How do I find out how was the application run? if by user or automatically by Windows?

Thank you
Cheers

推荐答案

对于在启动时运行的程序快捷方式,将"-autostart"之类的参数作为命令行参数传递.对于普通用户启动,您不会传递此参数.然后,该程序可以轻松地检查其参数,以确定它是否应该在托盘栏中启动.
For your program shortcut that is run on start up, pass in a parameter like "-autostart" as a command line parameter. For normal user startup you will not pass in this parameter. The program can then easily check its parameters to determine if it should start in the traybar or not.


这篇关于在启动时将应用程序隐藏到托盘栏中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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