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
 
Back
Top