Custom MenuItems

  • Thread starter Thread starter =?ISO-8859-1?Q?Carlos_Guzm=E1n_=C1lvarez?=
  • Start date Start date
?

=?ISO-8859-1?Q?Carlos_Guzm=E1n_=C1lvarez?=

Hello:

There are any way to make a MainMenu that creates the menu items
based a custom MenuItem implementation ??


Thanks in advance !!
 
Hi Carlos
Although it it not clear what you want . but you can create you own custom
menu control. You will create a windows control project. just create a
custom control menu that inherit the windows menu control then do your
desired modifications on that .
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
As Mohamoss suggested, inherit your MainMenu from System's MainMenu.
Then add a method to it that creates menu items and subitems with the
strings passed to that method.
Define some properties like display value, form_to_open, a Dataset or
something that can store some data. Then retrieve the menu structure from an
XML file or from a database into the Dataset and foreach record, call the
method declared above.
Create a dll with this control.
Drop your control on a form and on the load method of the form, call the
method on your MainMenu control that retreives menu data and creates the menu.

I guess this is something you want to do.

Hope it helps.
 
Hello:

Thanks for the answer.
As Mohamoss suggested, inherit your MainMenu from System's MainMenu.
Then add a method to it that creates menu items and subitems with the
strings passed to that method.

Well the idea was to use a custom MainMenu and a custom MenuITem
implementation.

What i want to know is if at design time i can add my custom MenuItem
to the MainMenu (what the .net MAinMEnu and MenuITem do but using my own
custom implementations thay overrides from the .net ones, not sure
if it's clear now)
 
Back
Top