Print Page | Close Window

Hiding a TaskPanel on VB6 MDI form

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=18165
Printed Date: 07 May 2024 at 4:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Hiding a TaskPanel on VB6 MDI form
Posted By: rogue
Subject: Hiding a TaskPanel on VB6 MDI form
Date Posted: 05 April 2011 at 9:29am

uploads/6676/Practise_-_CommandBars_&_TaskPanel.zip - uploads/6676/Practise_-_CommandBars_&_TaskPanel.zip

Hi

I have created a simple version of my problem in the vb app above.

Basically I have a TaskPanel, ActiveMenuBar and StatusBar on the main MDI form.  Once a choice is made I want to hide the MenuBar and the TaskPanel but leave the statusbar in place.

I can get the MenuBar to hide ok, however the TaskPanel hides itself but leaves behind the space it was occupying and doesn't return that to the mdichild's "client" area.

I am using the MoveAlignedControl call to get my TaskPanel not sit inside the MenuBar.

---

I also tried putting the TaskPanel in a DialogBar as per the MDISample but when I did that the TaskPanel didn't resize itself properly within the DialogBar (it stopped slightly short, roughly the height of the MenuBar by the looks of it).  It did 'hide' properly when I used this approach.



Is there anyway to get the TaskPanel to fully occupy the dialog?  (the gap is the grey area between the blue TaskPanel and the top edge of the StatusBar - just in case it is not clear).

Alternatively, a way to make the DialogBar mimic the color of the TaskPanel's style even if it the user changes it (via menu options or such)?

Thanks

Simon






Replies:
Posted By: Oleg
Date Posted: 06 April 2011 at 2:54am
Hi,

Here changes you need:


Private Sub CommandBars_RepositionAlignedControls(Left As Long, Top As Long, Right As Long, Bottom As Long)

If (tskMain.Visible) Then
    CommandBars.MoveAlignedControl tskMain, Left, Top, Right, Bottom
End If

End Sub

...

Private Sub tskMain_ItemClick(ByVal Item As XtremeTaskPanel.ITaskPanelGroupItem)

    If Item.Id = 1 Then
    
        CommandBars.ActiveMenuBar.Visible = False
        tskMain.Visible = False
        CommandBars.RecalcLayout
        





-------------
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