![]() |
Command Bar Peoblem in vb |
Post Reply ![]() |
Author | |
amolrajurkar ![]() Newbie ![]() Joined: 22 June 2004 Location: India Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
amolrajurkar ![]() Newbie ![]() Joined: 22 June 2004 Location: India Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() |
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") 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
|
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
amolrajurkar ![]() Newbie ![]() Joined: 22 June 2004 Location: India Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() |
Thank you for helping me. The code is perfect. Nice way to describe |
|
Amol Rajurkar
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |