Connecting Tech Pros Worldwide Help | Site Map

Dynamic Menus with Events

Stan Smith
Guest
 
Posts: n/a
#1: Jan 31 '06
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



Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#2: Jan 31 '06

re: Dynamic Menus with Events


"Stan Smith" <ssmith@adsprogramming.com> schrieb:[color=blue]
> 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.[/color]

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/>

Stan Smith
Guest
 
Posts: n/a
#3: Feb 1 '06

re: Dynamic Menus with Events


> Check out the 'MainMenu' and 'MenuItem' classes, the 'AddHandler and[color=blue]
> '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/>[/color]

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


Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#4: Feb 1 '06

re: Dynamic Menus with Events


Stan,

"Stan Smith" <ssmith@adsprogramming.com> schrieb:[color=blue]
> 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.[/color]

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/>

Closed Thread


Similar Visual Basic .NET bytes