简体   繁体   中英

ContextMenuStrip Is Available On NotifyIcon, But Not ContextMenu?

I'm adding a ContextMenu to a WinForm application and I want to associate it to a NotifyIcon. The issue is the NotifyIcon's properties only include ContextMenuStrip and not ContextMenu.

How can I add a ContextMenu to my icon?

Thanks!

Looking here I see it has a ContextMenu property. What version of .Net are you using? Perhaps you are looking at the property grid? You might have to set that property in code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM