I have a context menu attached to a form with some predtermined things I added during "design time". What I want to do is get a list of all open forms, and put the form titles into a Menu Item (Form List) as sub menu items. This is how I see doing those, though the coding is definitely wrong:
//This part works fine
contextMenuItem = new ToolStripMenuItem("Form List");
contextMenuItem.Click += new System.EventHandler(this.contextMenuItem_Click);
//This part doesnt
foreach (Form form in Application.Openforms)
So if anyone can show me how to make that second part work I would greatly appreciate it. Thanks.