Print Page | Close Window

MDI child w/o control box

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8588
Printed Date: 17 June 2025 at 10:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: MDI child w/o control box
Posted By: wakerunner
Subject: MDI child w/o control box
Date Posted: 30 October 2007 at 12:41am
If you have a ribbonbar on a MDI parent and have a child set to "controlbox=false" "minbutton=false" and "maxbutton=false" the child form is not displayed when loaded.



Replies:
Posted By: Oleg
Date Posted: 30 October 2007 at 5:43am
Hi,
 
Set WindowState to Normal. (from Maximized).  Standard Application without any Codejock controls works same.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: wakerunner
Date Posted: 30 October 2007 at 9:23am
You're right, without Commandbars VB does the same, the difference I just found though is without commandbars if you set controlbox=false maxbutton=true, the child is displayed but the child controlbox is not visible, with commandbars it is, (The X and maximize button is for the child)


Posted By: Oleg
Date Posted: 30 October 2007 at 10:13am
Use xtpFlagHideMDIButtons flag.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: wakerunner
Date Posted: 30 October 2007 at 11:17am
Could you give me an example where to put that flag, I haven't been able to make it work. Below is sample code from your MDI Ribbon sample, how would you set that flag in this code?
 
 
 

    Dim Control As CommandBarControl
    Dim ControlFile As CommandBarPopup
    Dim ControlAbout As CommandBarControl
 
    Dim RibbonBar As RibbonBar
    Set RibbonBar = CommandBars.AddRibbonBar("The Ribbon")
    RibbonBar.EnableDocking xtpFlagStretchedShared
    
          
    
    Set ControlFile = RibbonBar.AddSystemButton()
    ControlFile.IconID = ID_SYSTEM_ICON
    ControlFile.CommandBar.Controls.Add XtremeCommandBars.XTPControlType.xtpControlButton, ID_FILE_new, "&New", False, False
    ControlFile.CommandBar.Controls.Add XtremeCommandBars.XTPControlType.xtpControlButton, ID_FILE_OPEN, "&Open...", False, False
    Set Control = ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_FILE_PRINT_SETUP, "Pr&int Setup...", False, False)
    Control.BeginGroup = True
    Set Control = ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_FILE_MRU_FILE1, "Recent File", False, False)
    Control.BeginGroup = True
    Control.Enabled = False
    Set Control = ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_APP_EXIT, "E&xit", False, False)
    Control.BeginGroup = True
    ControlFile.CommandBar.SetIconSize 32, 32
   
    Set ControlAbout = RibbonBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_APP_ABOUT, "&About", False, False)
    ControlAbout.Flags = XtremeCommandBars.XTPControlFlags.xtpFlagRightAlign
   
Seting the flag here does not hide the controlbox for the MDI child
    ControlAbout.Flags = xtpFlagHideMDIButtons
   
   
 


Posted By: Oleg
Date Posted: 30 October 2007 at 1:36pm
Hi,
 
    RibbonBar.SetFlags xtpFlagHideMDIButtons, 0


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net