开发者

vb.net and ContextMenuStrip?

I'm using winforms and vb.net. When I right click on a textbox I get the copy/paste/etc popup menu. This is ok. But How can I add something to this menu, and where/how would I intercept the event when one would click on the Item I add 开发者_JAVA技巧to it?


This context menu is baked into Windows, there is no documented way to alter it. Nor is there a message that you could trap to hack the menu. Replacing it is certainly an option, check my answer in this thread for sample code.

Be careful with this, stuff gets added to this menu in different Windows versions. Like "Insert Unicode character" in Win7. You definitely want to avoid this if it is likely that your product will run in an Eastern Asian country.


You'll have to add your own menu if you don't want to use the default.

You'll have to replace the existing default functions with your own code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜