Ich wurde gestern wieder einmal gefragt, wie man ein NotifyIcon-Element bei .NET ein Bitmap-Image als Icon übergeben kann.
Eigentlich ist es ganz einfach, wenn man es weiß ![]()
// Here is our notifyIcon
NotifyIcon myNotifyIcon;
this.myNotifyIcon = new NotifyIcon(this.components);
// now we convert the Bitmap image in an icon
Icon icon = Icon.FromHandle(((Bitmap)Image.FromFile("Resources/Settings.png")).GetHicon());
this.myNotifyIcon.Icon = icon;