473,386 Members | 1,763 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,386 software developers and data experts.

Dynamic Menus with Events

Is there a way to create dynamic menus and create dynamic events associated
with those menus? I would like to create a menu system based on the
contents of a text file. When the menu item is selected it will execute a
routine whose name will also appear in the text file.

Thanks.

Stan

Stan Smith
ADS Programming Services
2320 Highland Avenue South
Suite 290
Birmingham, AL 35205
205-222-1661
ssmith.at.adsprogramming.com

Jan 31 '06 #1
3 1821
"Stan Smith" <ss****@adsprogramming.com> schrieb:
Is there a way to create dynamic menus and create dynamic events
associated with those menus? I would like to create a menu system based
on the contents of a text file. When the menu item is selected it will
execute a routine whose name will also appear in the text file.


Check out the 'MainMenu' and 'MenuItem' classes, the 'AddHandler and
'RemoveHandler' statements and the 'CallByName' function.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 31 '06 #2
> Check out the 'MainMenu' and 'MenuItem' classes, the 'AddHandler and
'RemoveHandler' statements and the 'CallByName' function.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Herfried,

Perfect! Thanks!

I haven't done much event based programming and I was making it a lot more
difficult than it needed to be. Thanks to your suggestion I found the
overloaded method that let me add a handler to the MenuItems.Add method.

I've been told that it isn't necessary to say thanks when someone answers
your question on a newsgroup and that it's even recommended that you don't
since it uses up bandwidth unnecessarily. So I'll just say thanks this once
for the help that you've provided me this time and the help that you will
undoubtedly provide in the future. I've read a number of your responses to
other posts and they've saved me a considerable amount of time.

Regards,

Stan

Stan Smith
ACT! Certified Consultant
ADS Programming Services
2320 Highland Avenue South
Suite 290
Birmingham, AL 35205
205-222-1661
www.adsprogramming.com
ssmith_at_adsprogramming.com

See what 40 Crystal Reports can do for ACT! 6 at
www.crystalclearreports.com
Feb 1 '06 #3
Stan,

"Stan Smith" <ss****@adsprogramming.com> schrieb:
I've been told that it isn't necessary to say thanks when someone answers
your question on a newsgroup and that it's even recommended that you don't
since it uses up bandwidth unnecessarily.


I am glad you could solve the problem. It's always nice to hear some
feedback and a thank you. Otherwise it seems that the OP didn't read the
reply.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 1 '06 #4

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

Similar topics

2
by: Shery | last post by:
Dear All, How could I make a menu have many sub-menus, note that the menu and sub-menus items come from database. Ex: a menu have items like: Products | Auctions | Orders the menu items...
1
by: Colvin | last post by:
I'm trying to create a pair of dynamic drop-down menus. I'm new to Javascript, so I tried to find a simple example on the web. I found a good example at...
2
by: Martin Doyle | last post by:
Ok, I'm building a JS-based limitless-sublevel dynamic menu and am making it cross browser as well - 3 packs of aspirin so far and counting ;) I'm having a weird rendering problem using Opera...
3
by: Eddie de Bear | last post by:
Hi, A project I am working on has a requirement for dynamic menus. For the most part this works really well. The menus I'm creating a based on files and directories, so naturally the menu...
0
by: JMMB | last post by:
Just couldn't find any article in MSDN about dynamic menus. I know i can create menus dynamically in run time using the information from a database combined with System.Refletion, but didn't find...
6
by: aroraamit81 | last post by:
Is there any way by which I can create a dynamic database driven Menu using ASP.NET/C#...... Thanks Amit Arora
2
by: Ron M. Newman | last post by:
Hi, Just need a little advice. Id like to build *dynamic* context menus for tree nodes. I'm pretty versed in building context menus and attaching them to tree nodes. My question is, what...
2
by: rpeterson84 | last post by:
Hello: I was hoping to gain some insight, a point in the right direction if you will... We use an .asp web page to select from a couple of dynamic drop down menus then enter a number, and press...
3
by: =?Utf-8?B?ZWFndWlsYXI=?= | last post by:
Hi, I am trying to dynamically generate a menu, based on entries on a text or xml file. The text file contains the "tree" after which the menu will need to be created. Something like the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.