adrianjohnson
Programmer
I seem to be struggling with this, yet it should be so easy.
I've got a winform, with a main menu already created. However, I want to add items to the main menu when the program is running.
I've already tried the code from here:
but it doesn't seem to like it.
The code I have so far is:
but that doesn't compile either.
Where am I going wrong?
Thanks,
Adrian
Adrian Johnson
I've got a winform, with a main menu already created. However, I want to add items to the main menu when the program is running.
I've already tried the code from here:
but it doesn't seem to like it.
The code I have so far is:
Code:
MenuItem newItem = new MenuItem("Item 1");
FormMain.MyMenu.MenuItems.Add(newItem);
but that doesn't compile either.
Where am I going wrong?
Thanks,
Adrian
Adrian Johnson