473,327 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 2302

Uzytkownik "tonFrere" <ju**********@gmail.comnapisal w wiadomosci
news:11**********************@45g2000cws.googlegro ups.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(new ToolStripButton("button"));

str.Items.Add(new ToolStripComboBox("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();
ToolStripMenuItem MITest = new ToolStripMenuItem("File");
MS1.Items.Add(MITest);

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**********@gmail.comnapisal w wiadomosci
news:11**********************@45g2000cws.googlegro ups.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(new ToolStripButton("button"));

str.Items.Add(new ToolStripComboBox("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();
ToolStripMenuItem MITest = new ToolStripMenuItem("File");
MS1.Items.Add(MITest);

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**********@gmail.comnapisal w wiadomosci
news:11**********************@45g2000cws.googlegro ups.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(new ToolStripButton("button"));

str.Items.Add(new ToolStripComboBox("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
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...
0
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...
2
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...
1
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)...
4
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. ...
7
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...
1
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...
1
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...
0
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....
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.