By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

Custom control for a ContextMenu control

P: n/a
I have a VB.NET application with two forms that contain a RichTextBox. I
have created a context menu for one of the RTF controls. I want the same
context menu to work for both. The no-brainer way to do it would be to
duplicate the code and controls in both forms. But there must be a better
way to handle this situation.

The answer likely involves a custom control of some type. I can't find a
reasonable reference that gets me started. Can someone point me to a Web
reference that contains information about creating a custom control based
upon a Context menu grouping.

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
genojoe wrote:
I have a VB.NET application with two forms that contain a RichTextBox. I
have created a context menu for one of the RTF controls. I want the same
context menu to work for both. The no-brainer way to do it would be to
duplicate the code and controls in both forms. But there must be a better
way to handle this situation.

The answer likely involves a custom control of some type. I can't find a
reasonable reference that gets me started. Can someone point me to a Web
reference that contains information about creating a custom control based
upon a Context menu grouping.


Just create a class that contains all the code for your context menu.
More than likely just inherit from the basic context menu class. Then
you can have as many controls use them as you like. If I don't
understand your question, so sorry.

Chris
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.