Print Page | Close Window

Hide maximize button

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=20245
Printed Date: 22 November 2024 at 8:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Hide maximize button
Posted By: Nick
Subject: Hide maximize button
Date Posted: 24 October 2012 at 1:20pm
Commandbars OCX v15.2.1, Visual Basic 6, Windows XP.  Using ribbonbars.

No problem getting my ribbonbar to work, but I need to hide the "maximize window" button as full-screen doesn't make sense for my application.  There's a code snippet in the help file:

    'This sample code illustrates how to hide the maximize MDI button on the menu bar.
    CommandBars(1).SetFlags xtpFlagHideMaximizeBox, 0

but it doesn't work.  The maximize button is still visible.  I've tried the other flag options, but none of them seem to achieve anything - the minimize, maximize and close buttons are always visible no matter what combination of flags I use.

I also tried CommandBars.ActiveMenuBar.SetFlags, with the same results (not surprising as it's the same thing really).

Anyone tried this and got it to work?

Nick.



Replies:
Posted By: Nick
Date Posted: 26 October 2012 at 6:34am
further info:  I realised that this code snippet is probably for the MDI buttons on a child form in an MDI application.  But I have an SDI application.  It seems that the enabled and disabled maximize buttons on the themed form look the same.



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