Print Page | Close Window

CommandBars

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=8475
Printed Date: 16 November 2024 at 2:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBars
Posted By: Bob
Subject: CommandBars
Date Posted: 19 October 2007 at 1:30pm

I have an SDI form and want to add a second ToolBar with only 5 or 6 buttons somewhere on the middle left side of the same form.  I saw in  an earlier post that a picture box could be used to do this but the post didn't describe the process.  How do I go about adding a toolbar in a picture box and getting it where I want on my SDI form?  Where do I add the second CommandBar control and where do I write the code?  I'm new at using the control and could use some help with this.

Thanks


-------------
Bob



Replies:
Posted By: Oleg
Date Posted: 19 October 2007 at 3:20pm
Just add another CommandBars to picture box and create same toolbar.

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


Posted By: Bob
Date Posted: 20 October 2007 at 9:17pm
That worked fine except my second toolbar had a visible rectangle around the 3 test bmp's that i used.  These bmp's were the same as those used in my form's main menu & toolbar which works fine.  I used a Skin control and the rectangle is clearly visible no matter which skin style I select. 
 
Note: I named the 2nd CommandBar as CommandBarPic and dimensioned the 2nd toolbar as ToolBar2.  Is this okay?
 
1. How do I get rid of that annoying rectangle?
2. The picture doesn't automatically stretch to display all 3 of the bmp's even though the AutoSize property is set to "True".  Should it stretch and show all 3 bmp's?
 
Again, thanks


-------------
Bob


Posted By: Oleg
Date Posted: 22 October 2007 at 2:29am
Hi,
 
Think its border of rectangle. Just Remove borders for rectangle.


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


Posted By: Bob
Date Posted: 29 October 2007 at 9:29am
How do I get rid of the rectangle?   I searched CJ's Help file and all I found was GetWindowsRect method...I didn't see anything on how to "hide" or eliminate the rectangle for the CommandBar.
 
Thanks,


-------------
Bob


Posted By: Oleg
Date Posted: 29 October 2007 at 12:51pm
Hello,
 
Attach sample application. I'm not sure what do you see.


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


Posted By: Bob
Date Posted: 31 October 2007 at 7:27am
Oleg,
 
Attached is the sample app: https://forum.codejock.com/uploads/20071031_065026_PicBox_ToolBar_.ZIP - uploads/20071031_065026_PicBox_ToolBar_.ZIP
 
The code for the PicBox and 2nd CommandBar is at the end of the Form Load event. I used the Skin Control to Skin the app.  I would like to hide the toolbar rectangle and only have the buttons appear (see bitmaps in .zip file).  Maybe this is not possible with the CommandBar Control?
 
Note: I tried to attach one of the bitmaps here but text kept popping up in the "Preview" portion of the Image Properties Window when I tried to upload the image, and the "Ok" button was disabled.  Why couldn't I attach an image to this post?
 
Thanks,
 
 
 


-------------
Bob


Posted By: gaudetm
Date Posted: 31 October 2007 at 8:39am
change visualtheme of second commandbars to office 2003 then no borders


Posted By: Oleg
Date Posted: 31 October 2007 at 9:24am
or call
 
CommandBarsPic.PaintManager.FlatToolBar = True


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


Posted By: Bob
Date Posted: 04 November 2007 at 2:26pm
Thanks Oleg & qaudetm... I went with Oleg's suggestion and I also set CommandBarPic.Visual Theme to xtpThemeOffice2000. This appears to work best since my app allows the user to apply a selected "skin". The form for skinning is from CJ's SkinMdi Sample and uses only those skins. I don't know if this will work with other skins or not.  I do know that if you apply some of the other Visual Themes to the CommandBar, no matter what the skin style is, the rectangle will still appear.
 
It would be nice to have a PictureBox with transparency. I did find an ActiveX Control (PictureBox) on the web at DevPower for bitmaps and other images but I haven't tried it. The site says it's written in VB6.
 
Again, thanks


-------------
Bob



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