Search code examples
c#winformsnotifyiconnotification-area

Changing style of the system tray icon at run time


I've created a system tray application using c#. And it is running successfully. Now the problem is, a notification window that has to be popped up when a particular event occurs(Not with a new icon but for the same icon which present in the notification area). The notification should last for few seconds and the notification area icon's colour should be changed till the window disappears.

Please suggest solutions. Thanks for helping!!!


Solution

  • If you use the class NotifyIcon you can set the Icon property:

    notifyIcon.Icon = <Some Icon> (ex. Properties.Resources.IconRed, if in your resources).