HighTechTalks DotNet Forums  

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

Dotnet General Discussions microsoft.public.dotnet.general


Discuss Is there a COUNTERPARTto VB6 Menu's 'WindowList' option in VB.NET??? in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Alan Mailer
 
Posts: n/a

Default Is there a COUNTERPARTto VB6 Menu's 'WindowList' option in VB.NET??? - 12-23-2007 , 03:56 PM






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.

Reply With Quote
  #2  
Old   
Jeff Gaines
 
Posts: n/a

Default Re: Is there a COUNTERPARTto VB6 Menu's 'WindowList' option in VB.NET??? - 12-23-2007 , 05:46 PM






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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.