|
|
#1 |
|
Addicted Member
Join Date: Dec 01
Location: Boston
Posts: 241
![]() |
[2005] [RESOLVED] Adding Menu Items to a Menu Control at Run Time
I keep finding help for pre .NET 2005 menu questions so I need a straight answer:
What's the code for adding a new menu item during runtime to a menu control created at design time? I also need an event handler as well. Thanks. Last edited by neef; Jun 3rd, 2007 at 01:39 PM. |
|
|
|
|
|
#2 |
|
Hyperactive Member
Join Date: May 06
Posts: 446
![]() |
Re: [2005] Adding Menu Items to a Menu Control at Run Time
Well your topic specified 2005 so I will use that.
Create a new ToolStripMenuItem like so: Code:
Dim myNewToolStripMenuItem as New ToolStripMenuItem Code:
myExistingMenu.Items.Add(myNewToolStripMenuItem)
__________________
Prefix has no suffix, but suffix has a prefix. |
|
|
|
|
|
#3 |
|
Addicted Member
Join Date: Dec 01
Location: Boston
Posts: 241
![]() |
Re: [2005] Adding Menu Items to a Menu Control at Run Time
Thank you.
It hit me after I posted that I could check my designer and whatever code I needed would be there. |
|
|
|
|
|
#4 |
|
Hyperactive Member
Join Date: May 06
Posts: 446
![]() |
Re: [2005] Adding Menu Items to a Menu Control at Run Time
If your problem has been solved then please mark the thread resolved.
__________________
Prefix has no suffix, but suffix has a prefix. |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|