Is there a COUNTERPARTto VB6 Menu's 'WindowList' option in VB.NET???

A

Alan Mailer

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.

At Runtime, a user of my application could then just click on one of
the 'captions' in the SubMenus to immediately make active on the
screen the window which carried that caption.

I'm writing to ask if Visual Studio 2005 VB.Net has a counterpart to
this.

If it does, I would like somebody to direct me to what it is.

On the other hand, if it doesn't, I would like a suggestion as to how
one goes about this in VB.Net.

Thanks in advance for your feedback.
 
J

Jeff Gaines

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top