Search code examples
c#notifyicon

How to change background color and text of notifyIcon component


How to change background color and text of notifyIcon component?

enter image description here


Solution

  • For the text, you want the BalloonTipText property:

    var notifyIcon = new NotifyIcon();
    notifyIcon.BalloonTipText = "Your string here";
    

    However the balloon's background color cannot be set using this type. If you really must change it, you can instead use the Shell_NotifyIcon function in the Win32API, as described here.