Pagoni

I would like to restrict the menu of MDI child forms (MdiWindowListItem) to only a subset of the current children.

Is it possible for an MDI child form to choose NOT to register itself with the MdiWindowListItem menu

Can I manually remove unwanted entries from the menu

Or, is my only option to forego the automation of the MdiWindowListItem facility and build the menu myself

PS this menu shows, by default, the Text property of the child form - can I set this to anything else



Re: Windows Forms General MDI form - menu of child forms (MdiWindowListItem) - restrict entries ?

nobugz

There is no property that prevents a child from getting added to the list. Nor is there an event that tells you that the list just got refreshed. You'll have to build the DropDown list yourself. WF updates the list whenever a child form receives the VisibleChanged event or the parent gets the WM_MDIACTIVATE message. I think you should be able to update your list in the Opening event.





Re: Windows Forms General MDI form - menu of child forms (MdiWindowListItem) - restrict entries ?

Pagoni

Thanks for the very prompt reply, Nobugz.

I thought that might be the case, but I hope you don't mind me asking.