The ribbon bar and QuickAccessToolbar are bound to and contained inside the MDI frame window (this is different from the tab bar which is contained inside the MDI client area).
If the MDI/MDIHelp frame window does not adjust the size of the MDIClient area through the resize event, the system will automatically adjust the size of the MDIClient area to ensure that the ribbon bar is displayed in the appropriate position (without the user having to add or modify code).
However, if the MDI/MDIHelp frame window resizes the MDIClient area through the resize event, you need to consider the size of the ribbon bar in the resize event.
For example, you can add the following code to the resize event:
mdi_1.x = this.workspacex () mdi_1.y = this.workspacey() + this.mdirbb_1.getbestheight() mdi_1.height = this.workspaceheight() - this.mdirbb_1.getbestheight() mdi_1.width = this.workspacewidth()
The mdirbb_1 object represents the ribbon bar displayed from the menu. For more information about mdirbb_1, refer to mdirbb_1 object.
Use the GetBestHeight method instead of the height property to get the height of the ribbon bar, because the height property may not accurately get the height of the ribbon bar. For example, when the QuickAccessToolbar feature is dynamically enabled and the AutosizeHeight property is turned on, the height property may not include the height of the QuickAccessToolbar.
In addition, if the current application MDI/MDIHelp frame window has customized the size of the MDIClient area (that is, if the size of the MDIClient area is not the default value), which may cause the ribbon bar area to be displayed but actually occupied by the MDIClient area, resulting in no response when the mouse clicks on that area. The solution is to adjust the size of the MDIClient area to ensure that the ribbon bar has enough space for display and operation. You can refer to the code example mentioned above and adjust the position and size of the MDIClient area as needed to meet the display and operation requirements of the ribbon bar.