System Tray Icon not appearing on startup

前端 未结 2 1361
半阙折子戏
半阙折子戏 2021-02-10 15:12

I use the following code in the FormCreate event handler to create a system tray icon. When I run my program the system tray icon appears fine.

I set my application be

2条回答
  •  误落风尘
    2021-02-10 15:47

    You're attempting to create the icon before Explorer has fully started. You should handle errors gracefully (scroll down to "Handling Shell_NotifyIcon failure").

    You should also handle the TaskbarCreated notification -- it enables you to recreate your icons after Explorer crashes and restarts.

提交回复
热议问题