473,695 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom Menus

Hello,
I'm new to C# programming and would like to create a menu strip at
form-load, based on the results of a SQL query. The function would
create a menu depending on user rights. Do you have any article where I
can learn about Menustip hierarchy, MenuStrip, ToolStrip,
ToolStripItem, How do I create sub, sub-sub, sub-sub-sub-menus etc. Or
is there an easier way to do this?

Thanks!
Justin

Nov 28 '06 #1
3 2323

Uzytkownik "tonFrere" <ju**********@g mail.comnapisal w wiadomosci
news:11******** **************@ 45g2000cws.goog legroups.com...
Hello,
I'm new to C# programming and would like to create a menu strip at
form-load, based on the results of a SQL query. The function would
create a menu depending on user rights. Do you have any article where I
can learn about Menustip hierarchy, MenuStrip, ToolStrip,
ToolStripItem, How do I create sub, sub-sub, sub-sub-sub-menus etc. Or
is there an easier way to do this?

Thanks!
Justin
Sorry, but do you know what's google or MSDN?

ToolStrip str = new ToolStrip();

str.Items.Add(n ew ToolStripButton ("button"));

str.Items.Add(n ew ToolStripComboB ox("combo"));

simple?
Forrest
Nov 29 '06 #2
Pretty instulting, I know how to create a menu element, a button or a
combobox on a menustrip, thank you.

My concern is about sub-menus. As I said, I'm new to C# programming and
I'm sure I'm just missing a very simple and obvious concept that will
allow me to go-on by myself. If I google it or search MSDN, I don't get
any information relative to my question since everything is so focused
on menustrip new features.

Let me put it that way:
MenuStrip MS1 = new MenuStrip();
ToolStripMenuIt em MITest = new ToolStripMenuIt em("File");
MS1.Items.Add(M ITest);

Now, how do I add items to MITest since I don't have an Items property
or a Add method... That's what I don't get. I'm sure I just have the
wrong object type but which one to use?

I would like to create a menu of type:
Edit->
->Copy
->Paste
->Paste Special->
->->Paste as new layer
->->Paste as new image
->Cut
etc.

Thanks,
Justin

Forrest a écrit :
Uzytkownik "tonFrere" <ju**********@g mail.comnapisal w wiadomosci
news:11******** **************@ 45g2000cws.goog legroups.com...
Hello,
I'm new to C# programming and would like to create a menu strip at
form-load, based on the results of a SQL query. The function would
create a menu depending on user rights. Do you have any article where I
can learn about Menustip hierarchy, MenuStrip, ToolStrip,
ToolStripItem, How do I create sub, sub-sub, sub-sub-sub-menus etc. Or
is there an easier way to do this?

Thanks!
Justin

Sorry, but do you know what's google or MSDN?

ToolStrip str = new ToolStrip();

str.Items.Add(n ew ToolStripButton ("button"));

str.Items.Add(n ew ToolStripComboB ox("combo"));

simple?
Forrest
Dec 7 '06 #3
Ok, ok! Finally got it.

They're dropdownitems. Makes sense.

Thanks for replying!
Justin

tonFrere a écrit :
Pretty instulting, I know how to create a menu element, a button or a
combobox on a menustrip, thank you.

My concern is about sub-menus. As I said, I'm new to C# programming and
I'm sure I'm just missing a very simple and obvious concept that will
allow me to go-on by myself. If I google it or search MSDN, I don't get
any information relative to my question since everything is so focused
on menustrip new features.

Let me put it that way:
MenuStrip MS1 = new MenuStrip();
ToolStripMenuIt em MITest = new ToolStripMenuIt em("File");
MS1.Items.Add(M ITest);

Now, how do I add items to MITest since I don't have an Items property
or a Add method... That's what I don't get. I'm sure I just have the
wrong object type but which one to use?

I would like to create a menu of type:
Edit->
->Copy
->Paste
->Paste Special->
->->Paste as new layer
->->Paste as new image
->Cut
etc.

Thanks,
Justin

Forrest a écrit :
Uzytkownik "tonFrere" <ju**********@g mail.comnapisal w wiadomosci
news:11******** **************@ 45g2000cws.goog legroups.com...
Hello,
I'm new to C# programming and would like to create a menu strip at
form-load, based on the results of a SQL query. The function would
create a menu depending on user rights. Do you have any article whereI
can learn about Menustip hierarchy, MenuStrip, ToolStrip,
ToolStripItem, How do I create sub, sub-sub, sub-sub-sub-menus etc. Or
is there an easier way to do this?
>
Thanks!
Justin
>
Sorry, but do you know what's google or MSDN?

ToolStrip str = new ToolStrip();

str.Items.Add(n ew ToolStripButton ("button"));

str.Items.Add(n ew ToolStripComboB ox("combo"));

simple?


Forrest
Dec 7 '06 #4

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

Similar topics

4
8569
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.
0
1290
by: Jonathan LaRosa | last post by:
Hi, I am working with a DB with custom menus. I am trying to get the "send to -> mail recipient (as attachment)" to show up on the custom menu. However, for the life of me I can't seem to get the "send to" part to show up. I can add the "mail recipient (as attachment)", but not the "send to". Any ideas? Furthermore, I also want to add "send to..." to the short-cut menu (i.e. when a user right clicks on a report), but I'm not sure...
2
2285
by: Sean Mullaly | last post by:
I have a custom Access menu with sub-menus and sub-sub-menus. (220 items). Right now I have created 220 Functions and attached each individual Function to the specific OnAction property. The Functions return Text which is the same as the Caption of the sub-sub-menu items. I would like to reference the Custom Popup Caption of these sub-sub-menus and pass it through one Function for input in a form. *** Sent via Developersdex...
1
1252
by: Karl Irvin | last post by:
I distribute an application with custom menus. It is distributed as an A 2000 mde. On a small number of computers my custom menus disappear and are replaced by other menus. My users (remote to me) all claim that their Access options are the same as they are on other computers on which the app works OK. In one case moving from Win2K to XP solved the problem. Has anyone else seen this and is there a way to fix the problem? Thanks
4
1695
by: Karl Irvin | last post by:
I distribute an A 2000 app as a mde. On a few customers, my custom menus are overwritten. The top menu is generally there but the choices on the menus are gone or replaced by something else. I can't figure this one out. Any ideas on what may be causing this? It happens on machines with A 2000 and A 2003, Win Home and Win XP. I've yet to see a pattern but it happens on about 3 or 4% of the users machines.
7
1720
by: Ian Hinson | last post by:
I have an Access app that has been distributed with run-time installation to many different customers over many years. It is developed in Access 2000. The custom menu bar has had no problems in the past. However on one new computer it was installed on last week the custom 'Tools' menu (which normally contains items such as 'Backup Data' and 'Preferences..' etc) has been replaced by a single menu item under Tools that says 'Other..'....
1
1537
by: shumaker | last post by:
I have copied tyhe Export button from the File menu to a custom toolbar by holding ctrl and dragging it. I have "Allow full menus" disabled and am running an Access 2002 data project(SQL frontend). When I open the project up in user mode, the Export button does not show up, but the custom toolbar is still there. It only shows up when I set "Allow full menus" to true, but obviously I don't want my users to have access to that. How do...
1
1790
by: frogsteaks | last post by:
In one (actualy several) of my databases I create custom menus. However on all of these menus, the "Type a question heer for help" combo box appears to the right side. Can anyone here point me to code (whatever) that will turn this feature off? Thanks, DB
0
2219
by: Sky | last post by:
I have an Access 2003 front-end database with custom toolbars. The toolbars work fine. One annoying feature is that at the far right edge of each custom toolbar there a small dropdown arrow. When you hover over it with the mouse, a ControlTip Text of "Toolbar Options" is displayed. If you then click on the dropdrown arrow, it displays a popup menu of "Add or Remove Buttons", with a fly-out menu with the toolbar name at the top and...
0
2910
by: ARC | last post by:
Hello all, For right-click (shortcut) menus in access 2007, I've been using a round-about method of opening access 97 on an old computer, modifying my own custom shortcut menus, then importing the menus only into my access 2007 project. This is proving cumbersome (especially since my old pc with access 97 likes to blue screen when running acc 97), and I was wondering if there's an easier way?
0
8625
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
8565
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
9113
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
8977
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...
1
8841
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
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
7658
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...
1
6488
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4339
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.