Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Remove Toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Remove Toolbar

 Post Reply Post Reply
Author
Message
Manuel View Drop Down
Newbie
Newbie


Joined: 05 May 2006
Location: Italy
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Manuel Quote  Post ReplyReply Direct Link To This Post Topic: Remove Toolbar
    Posted: 14 July 2006 at 9:59am
Can I insert a toolbar in a form unless create a menu?
In this moment i'm not able to do this!!
This is my code in vb
Thanks


'****************CODE***********************'
Private Sub AddToolbar()

    Dim Control As CommandBarControl
    Dim ControlFile As CommandBarPopup, ControlEdit As CommandBarPopup, ControlView As CommandBarPopup
    Dim ControlSelect As CommandBarPopup, ControlInsert As CommandBarPopup, ControlFormat As CommandBarPopup, ControlHelp As CommandBarPopup
   
    Set ControlFile = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "&File", -1, False)
    With ControlFile.CommandBar.Controls
        .Add xtpControlButton, 1, "&New"
        .Add xtpControlButton, 2, "&Open"
       
        Set Control = .Add(xtpControlButton, 3, "&Close")
        Control.BeginGroup = True
       
        .Add xtpControlButton, 54, "&Save", -1, False
       
        Set Control = .Add(xtpControlButton, 6, "Print Set&up...")
        Control.BeginGroup = True
        .Add xtpControlButton, 7, "Print Pre&view"
        .Add xtpControlButton, 8, "&Print"
       
        Set Control = .Add(xtpControlButton, 9, "&Exit", -1, False)
        Control.BeginGroup = True
    End With
   
    Dim ToolBar As CommandBar
    Set ToolBar = CommandBars.Add("Standard", xtpBarTop)
    With ToolBar.Controls
        .Add xtpControlSplitButtonPopup, ID_FILE_NEW_ARCHIVE, "&New"
        .Add xtpControlButton, ID_FILE_OPEN_ARCHIVE, "&Open"
        .Add xtpControlButton, ID_FILE_FAVORITES, "Favorites"
        .Add xtpControlButton, ID_ACTIONS_ADD, "Add"
        .Add xtpControlButton, ID_ACTIONS_EXTRACT, "Extract"
        .Add xtpControlButton, ID_ACTIONS_VIEW, "View"
        .Add xtpControlButton, ID_ACTIONS_CHECKOUT, "Checkout"
        .Add xtpControlButton, ID_FILE_WIZARD, "Wizard"
    End With
    ToolBar.ShowTextBelowIcons = True

    'Change Icon Size
    ToolBar.SetIconSize 42, 35

    'Disable MenuBar Docking
    CommandBars.ActiveMenuBar.EnableDocking xtpFlagStretched
    'Disable ToolBar Docking
    ToolBar.EnableDocking xtpFlagHideWrap

    Dim Items()
    Items = Array(ID_FILE_NEW_ARCHIVE, ID_FILE_OPEN_ARCHIVE, ID_FILE_FAVORITES, ID_ACTIONS_ADD, ID_ACTIONS_EXTRACT, _
            ID_ACTIONS_VIEW, ID_ACTIONS_CHECKOUT, ID_FILE_WIZARD)

    If (ImageManager.IsAlphaIconsSupported) Then
        ImageManager.Icons.LoadBitmap "C:\Programmi\Codejock Software\ActiveX\Xtreme SuitePro ActiveX 2006\samples\CommandBars\VB\StaticBars\Icons\alphaclr.bmp", Items, xtpImageNormal
        ImageManager.Icons.LoadBitmap "C:\Programmi\Codejock Software\ActiveX\Xtreme SuitePro ActiveX 2006\samples\CommandBars\VB\StaticBars\Icons\alphaclrsm.bmp", Items, xtpImageNormal
    Else
        ImageManager.Icons.LoadBitmap "C:\Programmi\Codejock Software\ActiveX\Xtreme SuitePro ActiveX 2006\samples\CommandBars\VB\StaticBars\Icons\highclr.bmp", Items, xtpImageNormal
        ImageManager.Icons.LoadBitmap "C:\Programmi\Codejock Software\ActiveX\Xtreme SuitePro ActiveX 2006\samples\CommandBars\VB\StaticBars\Icons\highclrsm.bmp", Items, xtpImageNormal
    End If
    CommandBars.Icons = ImageManager.Icons

    CommandBars.Options.UseDisabledIcons = True
    CommandBars.Options.ShowExpandButtonAlways = True


    'ommandBars.KeyBindings.Add FCONTROL, Asc("N"), ID_FILE_NEW_ARCHIVE
    'CommandBars.KeyBindings.Add FCONTROL, Asc("O"), ID_FILE_OPEN_ARCHIVE
           
End Sub
Corsos
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.203 seconds.