Print Page | Close Window

Remove Minimize Maximize and Close From MDI Child

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=24070
Printed Date: 27 January 2022 at 8:58pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Remove Minimize Maximize and Close From MDI Child
Posted By: CarlVaskman
Subject: Remove Minimize Maximize and Close From MDI Child
Date Posted: 25 September 2020 at 6:19pm

How can I remove the minimize/maximize/close buttons in an MDI child form?
I am using CodeJock Xtreme CommandBars ActiveX Control 17.3.0



I am trying to remove these with the following code.

Private Sub Form_Load()
    Dim ToolBar As CommandBar
    Set ToolBar = CommandBars1.Add("Standard", xtpBarTop)
    
    CommandBars1.ActiveMenuBar.SetFlags xtpFlagHideMDIButtons, 0
    CommandBars1.ActiveMenuBar.SetFlags xtpFlagHideClose, 0
    CommandBars1.ActiveMenuBar.SetFlags xtpFlagHideMinimizeBox, 0
    CommandBars1.ActiveMenuBar.SetFlags xtpFlagHideMaximizeBox, 0
    
    CommandBars1(1).SetFlags xtpFlagHideMDIButtons, 0
    CommandBars1(1).SetFlags xtpFlagHideClose, 0
    CommandBars1(1).SetFlags xtpFlagHideMinimizeBox, 0
    CommandBars1(1).SetFlags xtpFlagHideMaximizeBox, 0
    
End Sub

I have attached a sample MDI vb6 application.

uploads/9444/cj.zip" rel="nofollow - uploads/9444/cj.zip





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