On 23/12/2007 in message <03itm3h3m2jf2ep9slsi5bflm9dd96ntjo (AT) 4ax (DOT) com> Alan
Mailer wrote:
Quote:
When adding a new Menu to a VB6 application, a developer had the
option of designating the Menu as a 'WindowList' Menu. By choosing
this option at Design time, it enabled this particular menu at Runtime
to automatically list as SubMenus the 'caption' of every Window (or
Form) that was currently open in the application. |
Do you mean an MDI application? If so:
The main form needs 'IsMDIContainer' set to true.
Add a MenuStrip with a menu item called, say, mnuWindow with text 'Window'
Select the *main* menu strip (took me a while to figure that out) and set
'MDIWindowListItem' to 'mnuWindow'.
You then need to design a child form and a 'New' menu item which calls:
private void mnuFileNew_Click(object sender, EventArgs e)
{
FormChild frmChild = new FormChild();
// Set the Parent Form of the Child window.
frmChild.MdiParent = this;
// Display the new form.
frmChild.Show();
}
That's in C# but just leave the punctuation out and it's VB :-)
You will then find the window list automagically added to the 'Window'
menu. You can then add layout options.
--
Jeff Gaines