Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - MDI child w/o control box
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MDI child w/o control box

 Post Reply Post Reply
Author
Message
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post Topic: MDI child w/o control box
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2007 at 10:13am
Use xtpFlagHideMDIButtons flag.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post 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
   
   
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2007 at 1:36pm
Hi,
 
    RibbonBar.SetFlags xtpFlagHideMDIButtons, 0
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.