Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Task Panel
  New Posts New Posts RSS Feed - Hiding a TaskPanel on VB6 MDI form
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hiding a TaskPanel on VB6 MDI form

 Post Reply Post Reply
Author
Message
rogue View Drop Down
Newbie
Newbie
Avatar

Joined: 13 March 2011
Location: UK
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote rogue Quote  Post ReplyReply Direct Link To This Post Topic: Hiding a TaskPanel on VB6 MDI form
    Posted: 05 April 2011 at 9:29am

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



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: 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
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.141 seconds.