Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Command Bar Peoblem in vb
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Command Bar Peoblem in vb

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


Joined: 22 June 2004
Location: India
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote amolrajurkar Quote  Post ReplyReply Direct Link To This Post Topic: Command Bar Peoblem in vb
    Posted: 17 September 2004 at 5:17am

I have a problem in command bar. I want to add a menu with check mark and second problem is that i want to remove toolbar customization buttons or links. I am working in visual basic 6.0.

 

 

Kindly reply ASAP

Amol Rajurkar
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: 17 September 2004 at 6:30am
In execute event:
    ID_TOOLBAR_VISIBLE:
          CommandBars(2).Visible = !CommandBars(2).Visible
          Control.Checked = CommandBars(2).Visible

You could move last line to Update event:
    ID_TOOLBAR_VISIBLE:
          Control.Checked = CommandBars(2).Visible  

To Remove Button:
    Commandbars.Options.ShowExpandButtonAlways = False


Edited by SuperMario
Back to Top
amolrajurkar View Drop Down
Newbie
Newbie


Joined: 22 June 2004
Location: India
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote amolrajurkar Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 7:04am

Thank you for sending the code. I was able to remove the customize buttons through your code. but the check mark option is not clear.

This is what i am doing...

 Set controlcheck = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 10, "&View")
        With controlcheck.CommandBar.Controls
             .Add xtpControlButton, 11, "Tool Bar"
         End With

Or can i stop user to move my tool bar, i mean i want to lock my toolbar.

 

Thank you again,

Plz  Reply ASAP

Amol Rajurkar
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: 17 September 2004 at 7:11am
Dim Control As CommandBarControl
 Set controlcheck = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 10, "&View")
        With controlcheck.CommandBar.Controls
             Set Control =  .Add(xtpControlButton, 11, "Tool Bar")
             Control.Checked = True
         End With

Then in Update event:
    Case 11:
          Control.Checked = CommandBars(2).Visible  

To Disable Docking of a toolbar:
    CommandBars(2).ModifyStyle XTP_CBRS_GRIPPER, 0
    CommandBars(2).EnableDocking False
Back to Top
amolrajurkar View Drop Down
Newbie
Newbie


Joined: 22 June 2004
Location: India
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote amolrajurkar Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 8:17am

Thank you for helping me. The code is perfect.

Nice way to describe

Amol Rajurkar
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.155 seconds.