How to add ContextMenu to the system tray icon programmatically?

后端 未结 1 1303
-上瘾入骨i
-上瘾入骨i 2021-02-20 03:49

I want to programmatically add a context menu to my tray icon, so that when I right-click on the tray icon, it should show me the menu.How should I write the right-click event h

1条回答
  •  灰色年华
    2021-02-20 04:16

    Context menu on right-click is automatic, no need to handle it. Just build your menu and assign it to NotifyIcon.ContextMenu.

    0 讨论(0)
提交回复
热议问题