Print Page | Close Window

Picturebox with Commandbars included

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=12240
Printed Date: 07 October 2024 at 12:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Picturebox with Commandbars included
Posted By: MetallDesign
Subject: Picturebox with Commandbars included
Date Posted: 23 September 2008 at 2:20am
Hello

i have the following problem. i use the ssTab Control from Microsoft and want to place a commandbar on it. i try with a picturebox in the left corner, but i see just the gripper................


pls help

any Idee?????????????






Replies:
Posted By: Oleg
Date Posted: 23 September 2008 at 2:26am
Hi,
This Gripper is MenuBar.
Add some controls in code.


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


Posted By: MetallDesign
Date Posted: 24 September 2008 at 5:02pm
Thanks, here is the sample code

    CommandBarsGlobalSettings.App = App
    CommandBars.EnableActions
  
    Set Toolbar = CommandBars.Add("Standard", xtpBarTop)
    With Toolbar
            AddControl .Controls, xtpControlButton,             ID_ARBEITSZEITERFASSUNG, "&Arbeitszeiterfassung", , , xtpButtonIconAndCaption
           
    End With
   
    CommandBars.VisualTheme = xtpThemeRibbon
    CommandBars.EnableOffice2007Frame False
   
    Set CommandBars.Icons = ImageManager.Icons
    CommandBars.Options.UseDisabledIcons = True
       
    CommandBars.Options.ShowExpandButtonAlways = False
    CommandBars.Options.SetIconSize True, 42, 35

    CommandBars.AttachToWindow picToolbar.hWnd


Visual Basic 6.0 SP6 and WIN XP SP2


brgds


Posted By: LeeHayton
Date Posted: 01 October 2008 at 5:54am
Hello - If you are trying to produce thecomething like the picture below then do the following.
 
 
 
Place your PictureControl on the Tab and then place your commandbar control inside the PictureBox.
 
Then use the following code to write to the command bar.
 
Const ID_ARBEITSZEITERFASSUNG = 1
Private Sub Form_Load()
  
    Dim cbb As CommandBarButton
    Set cbb = CommandBars.ActiveMenuBar.Controls.Add(xtpControlButton, ID_ARBEITSZEITERFASSUNG, "&Arbeitszeiterfassung")
        cbb.Style = xtpButtonIconAndCaption
   
    CommandBars.VisualTheme = xtpThemeRibbon
   
End Sub
 
Regards
Lee



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