hardcodet / wpf-notifyicon

NotifyIcon (aka system tray icon or taskbar icon) for the WPF platform
MIT License
830 stars 130 forks source link

add menu in winform #112

Open FreeVB opened 3 months ago

FreeVB commented 3 months ago

ContextMenu contextMenuStrip = new ContextMenu(); ToolStripMenuItem menuItem1 = new("menu 1", Resources.Led.ToBitmap()); ToolStripMenuItem menuItem2 = new ("menu2", Resources.Led.ToBitmap()); contextMenuStrip.Items.Add(menuItem1); contextMenuStrip.Items.Add(menuItem2); notifyIcon.ContextMenu= contextMenuStrip;

How do I add a right-click pop-up menu to Winform? I don't show the menu text as above.

The icon is also not displayed.