Print Page | Close Window

Problems with CommandBars in VB6 MDI App

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=12570
Printed Date: 07 October 2024 at 10:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problems with CommandBars in VB6 MDI App
Posted By: stefanadelbert
Subject: Problems with CommandBars in VB6 MDI App
Date 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




Replies:
Posted By: Oleg
Date Posted: 30 October 2008 at 3:13am
Hi,
You can try DIalogBar class. See our MDISample.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: stefanadelbert
Date 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


Posted By: SuperMario
Date 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



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