MDIList property missing?

This could just be a case of me doing something wrong, but I can't seem to find the MDIList property anywhere for any items in the MenuList control. I've searched all over the 'net and the MSDN forums/helpfiles and cannot find anyone else who seems to have this issue. The helpfile states the changes from VB6 to VB.NET, and lists the MDIList property.

Using VB 2005 Express, by the way. Is this a limitation in the Express version Is it because it's a beta I'm really confused by this, so any help would be greatly appreciated. Thanks!


Answer this question

MDIList property missing?

  • Steven Kelly

    The MainMenu has changed to MenuStrip. To set the MdiList you now have to select the MenuStrip and in it's properties find MdiWindowListItem and set the value to the name of your ToolStripMenuItem, for example windowsToolStripMenuItem, that you want to hold your windowslist.

  • J-BRIM

    Well color me red, I've figured it out...

    I put in form_load()...

    Me.MenuStrip1.MdiWindowListItem = WindowMenuToolStripItem

    And the sucker worked. How 'bout that Perhaps not the prettiest way to do it, but since I can't seem to find the MdiList property anywhere, this will have to do unless/until someone can suggest a better way Smile

  • zul_slider

    It would be very helpfull to find a solution to this problem.  I am running into it to.  I would like to be able to do this via properties, as I am still learning.


  • John P. Grieb

    I'm running into this with VS.NET 2005 BETA 2 as well.  Does someone have a more elegant solution for this

     


  • Chung Nguyen Nam

    G'day All,

    Thnk you for this post as it was very helpful !!

    For you C# people like myself out there, here is the code:

    this.menuStrip.MdiWindowListItem = menuWindow;

    'menuStrip' is the menu control on your form

    'menuWindow' is the actual menu item where you want to list all the windows that are open....

    _________________________________

    Here is some extra code if any finds it useful. It allows the parent MDI form to only open 1 child form per menu item and then if the user clicks on the same menu item the it will grab back the instance of the form that is already running.

    This is the code in my MDI form that opens a MDI child form (EmployeeMgmt)

    private void menuStaffEmployees_Click(object sender, EventArgs e)

    {

    EmployeeMgmt f = EmployeeMgmt.Instance();

    f.MdiParent = this;

    f.WindowState = FormWindowState.Maximized;

    f.Show();

    f.Activate();

    }

    This is the code in my MDI child form(EmployeeMgmt)

    public partial class EmployeeMgmt : Form

    {

    private static EmployeeMgmt frm;

    public static EmployeeMgmt Instance()

    {

    if (null == frm)

    frm = new EmployeeMgmt();

    return frm;

    }

    public EmployeeMgmt()

    {

    InitializeComponent();}

    }

    }


  • Dewa

    I think I found the solution to this problem, the instructions given in the MSDN walkthrough for this are incorrect.  To define which of your menu items will be the 'Window' command to hold the child forms, set the MdiWindowListItem property of your MenuStrip control to the proper ToolStripMenuItem; don't go banging your head searching for the ToolStripMenuItem.MdiList property as it doesn't appear to exist.
  • exp2000

    Correct.  this is new for Visual Studio 2005.  There are newer versions of the Menu Controls for Windows Forms. 

    Although System.Windows.Forms.ToolStripMenuItem replaces and adds functionality to the System.Windows.Forms.MenuItem control of previous versions, System.Windows.Forms.MenuItem is retained for both backward compatibility and future use if you choose

    Here's a link to the update Walkthrough for Visual Studio 2005

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxmclictl/html/04fb414b-811f-4a83-aab6-b4a24646dec5.htm



  • MDIList property missing?