Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Problems with CommandBars in VB6 MDI App
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problems with CommandBars in VB6 MDI App

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


Joined: 29 October 2008
Location: Australia
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote stefanadelbert Quote  Post ReplyReply Direct Link To This Post Topic: Problems with CommandBars in VB6 MDI App
    Posted: 29 October 2008 at 9:46pm
I'm retro fitting Xtreme CommandBars into a VB6 MDI app. There is a custom navigation control built inside a VB6 PictureBox that is drawn docked to the left of the main MDI Form which works fine with the VB6 menus.

When I add Xtreme CommandBars to the app, the menu and tool bar draw themselves docked at the top of the form (as expected), but the custom control in the PictureBox draws itself on top of the menus/toolbar rather than on the background of the MDI Form.

Has anyone seen this behaviour before? Does anyone have any ideas on how to solve it?

I've tried to put the PictureBox control inside an Xtreme DockingPaneFrame, but VB6 crashes when I try to set the handle of the Pane to the hWnd of the PictureBox. It is also drawn on top of the menus/toolbar and calling SetCommandBars, but that has no effect.

If I use a DockingPane I can get the pane docking below the menus/toolbar, but if I set the handle of the pane to the PictureBox hWnd, VB6 crashes.

I've included a screenshot of a simple MDI app created to illustrate the issue (blue PictureBox docked left).

Note that I need to the PictureBox to dock to the left of the MDI Form in the space below the menus/toolbar.

Looking forward to your suggestions.

Many thanks
Stefan

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: 30 October 2008 at 3:13am
Hi,
You can try DIalogBar class. See our MDISample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
stefanadelbert View Drop Down
Groupie
Groupie


Joined: 29 October 2008
Location: Australia
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote stefanadelbert Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2008 at 5:39pm
Hi Oleg
What are you suggesting I user DialogBar for? To contain the PictureBox?
Thanks
Stefan

I've sorted this out. It does seem to work. It's interfering with the VB6 status bar, but I should really replace that with the Xtreme status bar anyway.

Thanks for the suggestion, Oleg.

Stefan
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2008 at 10:34am
I believe this would work as well:

Private Sub CommandBars_RepositionAlignedControls(Left As Long, Top As Long, Right As Long, Bottom As Long)
  CommandBars.MoveAlignedControl Picture1, Left, Top, Right, Bottom
End Sub
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.