且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在启动时将应用程序隐藏到托盘栏中

更新时间:2022-05-01 02:58:56

对于在启动时运行的程序快捷方式,将"-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.