Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Hide/disable Form ControlBox button
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hide/disable Form ControlBox button

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


Joined: 29 April 2009
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Squale Quote  Post ReplyReply Direct Link To This Post Topic: Hide/disable Form ControlBox button
    Posted: 08 July 2010 at 9:19am
Is it possible to hide or disable form controlbox button at runtime?
In my VB6 application, resize is not supported, therefore I have disabled MaxButton. I would have prefered make it not display.
For modal form I would like to hide minimize and maximize button.
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2010 at 4:43am
Hi,

This has nothing to do with the Codejock software, what you are requesting is specific to VB6.

You do one of two things...

  1. Set the ControlBox property on the Form to False, this removes all buttons including the Form Icon leaving only the caption.
  2. Or set the BorderStyle to 1 - Fixed Style, this removes both the minimize and maximize buttons.
Next time use Google!
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
Squale View Drop Down
Groupie
Groupie


Joined: 29 April 2009
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Squale Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2010 at 5:03am
thanks xander for your answer but... Google can not help (you must be a fan of "Let me google that for you" http://www.lmgtfy.com/?q=Boulet&l=1)

My question is to know if we can "play" with commandbar controlbox. Hiding "maximize" button and having "miminize" and "close" one re-arrange. Why not, a way to add new button next to controlbox one.

CommandBar "SetFlags" seems to be THE solution but I have not found a way to make it works.
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2010 at 6:13am
Hi,

As far as I know the ControlBox of a Form is skinned by the Codejock tool and that's all, as the Form is still a VB Form underneath.

Using the "CommandBars.ActiveMenuBar.SetFlags" option only removes the selected box from the CommandBars when used with a MDI application, not the Form.



To do this use the following code:


    CommandBars.ActiveMenuBar.SetFlags xtpFlagHideMaximizeBox, 1

But as far as I can see it does not change the Forms actual ControlBox area.

Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
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.172 seconds.