The MenuDesigner is Private so you cannot derive from MainMenu and get it to
use your custom menuitems.
You have options though:
1. Code the Paint and MeasureItem Events for every MenuItem after setting
them to OwnerDraw.
2. Create your menu as usual and, once you've defined all the menuitems,
expand the 'Windows Form Designer generated code' region and do a search and
replace of 'System.Windows.Forms.MenuItem' with 'MyNameSpace.MyMenuItem'
(assuming that's the NameSpace and Name of your custom MenuItem)
3. Create a MenuExtender component to extend the properties of standard
MenuItems.
An Office Style Menu Class(Source Code)
http://dotnetrix.co.uk/menus.html
A MenuExtender(No Source, but you will find source for similar components
via Google)
http://dotnetrix.co.uk/controls.html --> MenuSkinner
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Raj Singh Sisodia" <Ra*************@discussions.microsoft.com> wrote in
message news:D4**********************************@microsof t.com...
Hello Sir/Madam,
I am tring to create Menu and toolbar controls that looks like the one
used in Office Xp. I have trird using the Menu class to create my own
myMainMenu and MyMenuItem but in Ide after I put myMainMenu and try to
create the subitems it creates MenuItem rather than myMenuItem how do i
solve this problem. Also what would be the right way to achive my target
create from scratch or use these base classes. If you could frovide any
further information that I havent aksed you are most welcome. Also I am a
VB.NET not c# so please keep that in mind when you reply.
Regards
Raj Singh Sisodia
--
I am here to solve problems and add a few of mine to yours
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004