开发者

Detect if Application start using a manual handling (Pressing an Icon) or start when windows start

I have made my application to start automaticly when windows start (registry ../currentversion/run/appname + path). In this mode the application start minimiz开发者_如何学运维ed and an little icon appear in the notification icon area. With this icon you can maximize the app or exit it.

If you exit the app and start it again using the Menu (Start/programs etc) than the application start in minimized mode (and in this case I would like to have it in normal mode) because the setting autostart is still true.

Is there a way you can detect when the application start when windows startup using the above registry or when people click on an icon in the programs menu (or desktop)?

Do I make myself clear?


I might miss the obvious, but - why is the registry shortcut not something like

yourApp.exe -startHidden

While the normal shortcuts start it visible?


How about setting the registry key to call your application with an /AUTOSTART commandline parameter. Then you can test for this and know that you've got the registry start, not the manual start.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜