Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Extending the ContextMenu Class
 

Extending the ContextMenu Class

Hi,

I want to extend the ContextMenu class,
I want to add new methods and properties


Do I just create a new class which inherits from ContextMenu ?
Or is there anything else I need to do ?

I want the user to be able to add my custom ContextMenu to
a form using Visual Studio.NET

Thnx.
MigrationUser 1  Wednesday, May 14, 2003 9:12 AM
That's pretty much all you need to do...  For the user to be able to drag the control onto their form, you will want to compile the derived context menu into a DLL and then instruct them how to add it to the toolbox:

Right Click the toolbox -> Select Customize Toolbox -> Click .NET Framework Components Tab -> Click Browse -> Navigate to the DLL -> Select it and click ok -> The control should now appear in the list of available items -> Ensure the checkbox next to it is checked -> Click Ok and voila.  Your control is now on the toolbox.
MigrationUser 1  Wednesday, May 14, 2003 10:57 AM

You can use google to search for other answers

Custom Search

More Threads

• Apply different themes to the form....
• How to give Validations for Controls in C#.net Windows Aplications
• Trying to Create a Mobile Application that Supports Video
• RichTextBox that grows and shrinks to fit content
• resources embedded into satellite assemblies
• ListBox.SelectedIndices.Add(0) does not work
• Form Designer loading problem
• Designer loader did not provide a root component, but did not indicate why
• Adding controls on the fly
• deriving from Panel and how to use it in form designer