Unwanted system menu buttons on MDI Child forms (OpenInsight 32-bit)
At 11 FEB 2022 07:41:00AM Rich Channer wrote:
Hi All,
Using OI94…
We have an MDI form in our app, with no drop-down system menu, which spawns MDI child forms that are always maximised within the frame, and only ever one window at a time. We like it like that. The user is not able to minimise/maximise/restore the MDI child window, only the frame. They risize the frame and the child resizes within it - all is well.
However, we are testing the idea of having a drop-down system menu on the MDI frame - which is fine when there are no open child windows, but, as soon as a child window is displayed, a second set of min/restore/max buttons appear on the menu bar - thus allowing users to min/max/restore the child window within the frame - not so good.
Can I (a) stop them from appearing, or at least (b) stop them working ?
It does not seem to matter if the child window is thin/thick/dialog frame, with or without title/system menu, they always appear.
Cheers, Rich
At 11 FEB 2022 07:57AM Carl Pates wrote:
Hi Rich,
Unfortunately we have _very_ little control over MDI and MS provide no real customization interface to it (MS abandoned MDI many years ago - even though it remains popular among desktop developers). You get what they say you get.
In v10 we have slightly more control as we don't use normal Windows menus - so we can determine what gets displayed (ironically there's a bug in v10 where the buttons are NOT drawn which is kind of what you want!)
What you _might_ be able to do is use Windows API calls to remove the Minimize/Restore/Maximize options from the child's System Menu, and this might remove or disable the buttons, but i haven't tried this.
Regards
At 21 MAR 2022 12:58AM Matthew Crozier wrote:
What you _might_ be able to do is use Windows API calls to remove the Minimize/Restore/Maximize options from the child's System Menu, and this might remove or disable the buttons, but i haven't tried this.
Hmm, we do want the System Menu and Minimize/Restore/Maximize buttons, and certainly the Close button on our MDI Child windows. However when the MDI child is maximised to fill the MDI Client area, all these buttons disappear - and there's no way to Restore or even Close it!
I see in the Examples application, the Maximise option has been disabled. Perhaps that's why? ;)
Cheers, M@