Generic Context Menu

  • Thread starter Thread starter Jasen
  • Start date Start date
J

Jasen

Hi,

May I know how to make a generic context menu (which may contains
save, new or other funtions) to be inherited by different winform?

Thanks in advance.

Jasen
 
One way to do this would be to have a base form (which derives from
System.Windows.Forms.Form), then all your forms derive from that form.
In the base class you would have a function that returns your menu
items.
Event handler for those, could either be in the base form (if they are
generic) or implemented (overwritten) in each form.

brg,
Magnús
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top