473,672 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Toolbars and Menus

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
Nov 22 '05 #1
2 1758
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.My MenuItem'
(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.m icrosoft.com> wrote in
message news:D4******** *************** ***********@mic rosoft.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
Nov 22 '05 #2
Hello Mick,
Thanks for your reply, it really helped me but actually I am tring to make a control and I dont want to write any extra code to use it. I want it to be as simple as using the menus provided by >net ramework or the other 3rd party controls.
I think I will go by your advise to create an extender.
Thank you again for your help.

Best Regards
Raj Singh Sisodia
--
I am here to solve problems and add a few of mine to yours
"Mick Doherty" wrote:
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.My MenuItem'
(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.m icrosoft.com> wrote in
message news:D4******** *************** ***********@mic rosoft.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

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1900
by: Jason Webb | last post by:
Dear Microsoft, The current "Windows.Forms" controls included in the .Net Framework are good, but in many ways they're pretty basic, and I think it's time that you take Windows.Forms to the next level. I really think that the menus and toolbars used in Office 2003 should be added to the .Net Framework as standard controls in the next release of the Framework and VS.NET, codenamed "Visual Studio .Net for Yukon." This would truly take...
4
8555
by: Karl Irvin | last post by:
In a 2000, can you transfer custom menus and toolbars to a new Access database. My mdf file is not compiling and I'm importing all data to a new database but don't see a way to get the menus/toolbars over.
2
2166
by: Heather | last post by:
I'm working on a db that has custom toolbars and menus. So all the commands for editing/designing forms, etc are gone. How do I get the default toolbars and menus back? I have no way to contact the db's creator. Thanks! Heather
1
1799
by: MacDermott | last post by:
I have an MDB file which is secured using a custom MDW file. I'd like to have most users see only the shortened menu you see when you set the Startup option "Allow full menus" to False. But the administrator should be able to see the full menus, plus toolbars. The shift-bypass key is disabled; too many people know about it. If I allow toolbars at startup, I can't seem to set the visible property of either the "Form View" or...
1
11298
by: cefrancke | last post by:
I have set the Startup properties to the following... All menus, toolbars, etc are turned off plus these are unchecked Allow Full Menus Allow Built-in Toolbars Allow Default Shortcut Menus Allow Toolbar/Menu Changes Use Access Special Keys
3
11504
by: cefrancke | last post by:
The only reason I ask is that no one has made this subject clear or given a definitive answer. What I would like to do is, after turning off all the menus/tbars/etc using the startup options. Upon restarting Access, when an admin is detected (I use a GetSystemUser() function) I want to restore everything so that Access behaves like normal, ie. all menus/tbars/etc show up (only where they are supposed to show up).
4
5447
by: TechBoy | last post by:
(RE: Access 2002 SP3) There are many default toolbars that have the database window icon in them. Different users will have various ones visible when my app starts. When my app opens, I only want to display my custom toolbar in my app and hide all others. Here are some that some of my users have open...(my list keeps growing here as I continue testing on different workstations:)
0
1164
by: Frank Rizzo | last post by:
I've noticed that the toolbars and menu controls got an overhaul in vs2005. Is there anyway to make them work like they do in 3rd party solutions (like infragistics or devexpress) or MFC (back in the day) where the menu item and the toolbar item is the same control. In other words, if you disable the toolbar item, the corresponding menu item also gets disabled. Also, a pointer to a good tutorial on using the toolbars/menus with tips...
1
3355
by: bjaeger | last post by:
A few months back I was "playing" with an Access 2000 application I created. I somehow disabled the delete option from all menus, toolbars, and context menus. Now I cannot do any maintenance on the database because I cannot delete anything. I do not have a database password set up, or users with security and rights. I cannot find an option for how I did this and cannot remember how I did it. Any ideas?????
15
1923
by: Neil | last post by:
So, I tried to copy a toolbar. I have a custom menu bar for a form. Tried to copy it so that I could modify the copy and use it with another form. With no direct way to copy it, I made a copy of the MDB, renamed the toolbar, and then imported it back into the original MDB as a copy of the original (see "Copying a custom menu bar" thread here). Everything seemed fine until I tried to modify the copy. When I added or removed items from the...
0
8486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8406
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8932
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8831
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8683
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7449
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2821
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.