MenuItem.Popup == ToolStripMenuItem.???
I'm working with an old C# book and it is telling me to add a MainMenu to a Form and then set the Form's Menu to this new MainMenu that I've added, but I can't do that because the Form doesn't have a Menu property - just a MainMenuStrip. So I guess I have to use a MenuStrip, which I'm OK with, but the book is also telling me to add an event handler for a MenuItem's Popup event which the ToolStripMenuItem does not have.
Other than the obvious (get a new book), can anyone tell me how to resolve this situation? What is the equivalent of the MenuItem.Popup event?
Re: MenuItem.Popup == ToolStripMenuItem.???
just use the menustrip instead of mainmenu.
DropDownOpening is what you're looking for to replace popup.
good luck.
Re: MenuItem.Popup == ToolStripMenuItem.???
Thanks, MadHatter!
Another question...
How about MenuItem.MenuItems = ToolStripMenuItem.???
I found the below article, but it didn't have anything to convert the MenuItem.MenuItems.
http://www.codeproject.com/useritems...oMenuStrip.asp
Re: MenuItem.Popup == ToolStripMenuItem.???
hey!
popup is all about displaying the menu. if you want to see which menuitem is clicked, you should set onclick event and check...
Code:
ToolStripMenuItem m_ClickItem = (ToolStripMenuItem)sender;
if(m_ClickItem == mytoolstripmenuitemFileOpen)
{
do something
}