Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Hide "Customize Quick Access Toolbar" Button
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hide "Customize Quick Access Toolbar" Button

 Post Reply Post Reply
Author
Message
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Topic: Hide "Customize Quick Access Toolbar" Button
    Posted: 18 October 2006 at 10:13am
We have added some icons to the Quick Access toolbar, but we don't want our users to be able to edit the toolbar.  Is there a way to either (1) hide the option to customize the quick access toolbar, or (2) hide the drop down control that is displayed on the quick access toolbar?
 
Thanks,
 
Dan
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2006 at 1:01am
Hello,
no, it can be done. You can only hide all QuickAccess.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2006 at 1:14am
Originally posted by oleg oleg wrote:

Hello,
no, it can be done. You can only hide all QuickAccess.


Er Ok. Can you please add a flag/property so we can hide it?
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: 24 October 2006 at 11:13am
will be added for 10.4
Back to Top
Waescher View Drop Down
Newbie
Newbie


Joined: 15 September 2006
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Waescher Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2007 at 6:13am
I'm sorry... I found no way to do this in 10.4 Demo.
Any suggestions?
Back to Top
herbat View Drop Down
Newbie
Newbie
Avatar

Joined: 03 October 2006
Location: Poland
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote herbat Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2007 at 1:06pm
try to use ControlQuickAccess method like
   
RibbonBar.ControlQuickAccess.Visible = False
Adam
Back to Top
Waescher View Drop Down
Newbie
Newbie


Joined: 15 September 2006
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Waescher Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 6:48am
No, I'm sorry.
That doesn't work...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 8:09am
Hi,
Do you see drop down control in Ribbon after you call
RibbonBar.ControlQuickAccess.Visible = False ??
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Waescher View Drop Down
Newbie
Newbie


Joined: 15 September 2006
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Waescher Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 9:04am
No, sorry... the DropDown-Button is not my problem.
I'm searching a way to hide the RightClick-PopupMenu shown in the pic below...


Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 9:36am
Hi Waescher,

See my post here for a solution (at least until we hear about/get an official solution):

https://forum.codejock.com/forum_posts.asp?TID=6117

You are free to use/modify the DLL and Source Code any way you please.


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 9:43am
Hello,
You can hide this popup and quick access  if you call .ShowQuickAccess = False
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 9:55am
Hi Oleg,

    This is true, but in mine and Waescher's case, we would like to show a non-customizable QuickAccess bar, and then the context menu is misleading to the user.
    I have tried setting all of the various customizable & context menu properties to false (i.e. .EnableCustomization for the parent CommandBar, and .Customizable & .ContextMenuPresent for the RibbonBar), but the context menu always seems to appear on right-click.
    The only solution I have found is to subclass the RibbonBar window and consume the WM_RBUTTONDOWN/UP messages.

JPB
Back to Top
Waescher View Drop Down
Newbie
Newbie


Joined: 15 September 2006
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Waescher Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 10:08am
Yes, thats right! I would like to use a non-customizeable QuickAccess-Bar.

The subclassing-solution is great! Thanks a lot, jpbro!

Wow!
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2007 at 10:18am
No problem Waescher, glad to help!

I put this code together fairly quickly last night (when I encountered the problem myself), so if you notice any problems, please feel free to email me. My email address is in the source code.

Back to Top
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2007 at 5:22am
Hello Jpbro,
I download the example you provide, but I can't get it to work, can you please what I have to do in order to use it.
 
I am not aware of the subclassing and how it works
 
I appreciate your help
 
Best regards
Waleed
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2007 at 2:22pm
Hi Waleed,

    What problems are you having? Are you getting an error message? Make sure that you are opening the VBG file (Project Group) instead of the VBP (Project) file.
    The test form shows you what you need to do to get the subclass setup (see the Form_Load event).
Back to Top
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2007 at 3:28am
Hello,
I open the VBG I try to run the application when I get this error message:
"No creatable public component detected"
 
Also, I can't see where does the form or the test application load the .dll ??
 
Thanks and best regards
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2007 at 6:44pm
Hi Waleed,

    I'm at a bit of a loss as to why you are getting that error message. Usually that only occurs when you are making an ActiveX EXE or DLL, but the test project included is a standard EXE.

    If you are try to use the included DLL in your own project (although I recommend you experiment with a test project first), you will need to register the DLL.

1) First copy the CommandBarBehaviours.dll file to your Windows system folder (i.e. C:\Windows\System32)
2) Register it from the Start button > Run command (or press Windows key + R) with the following command line:

regsvr32 c:\windows\system32\CommandBarBehaviours.dll

(Note, if your Windows sytems folder path is different, then change it in the line above)

3) Launch VB6 and open your project. You will now need to reference the DLL for your project from the Project menu > References sub-menu (note that the name of the class is CmdBarBehaviours).

Because I created the DLL class as a GlobalMultiUse class, you do not need to instantiate it any further - just reference the now global properties. If you don't like this behaviour, I recommend you recompile the DLL with the CmdBarBehaviour class Instancing property set to MultiUse. You would then have to initialize an instance of the class in your main project code.

I developed the code with CommandBars 10.4, and I just tested it with 11.1 and everything seems to be working here. The code was intended as proof of concept rather than I finalized product, so maybe I will give another kick at it to make it more user friendly.
Back to Top
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2007 at 6:37am
Hello jpbro,
This error message comes from the .VBG, but when I try to run the testproject.vbp I got another error message which is "ActiveX component can't create Object" at this line in the form load:
"SystemButtonID = ID_BTN_SYS ' Set to the ID of the SystemButton"
 
I hope this can help
Best regards
 
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2007 at 12:03pm
Hi Waleed,

These errors typically occur if the class instancing has been set to Private and/or the included DLL has not been registered properyl. Try the following:

1) Make sure that the CommandBarBehaviours class in the CmdBarBehaviours project has its instancing property set to GlobalMultiUse
2) Make sure that you have registered the CmdBarBehaviours.dll file (using regsvr32, or by adding a reference to the TestProject from the Project menu > References sub-menu).
3) If it still doesn't work, perhaps you can start a new project, then add the CmdBarBehaviours reference to your project from the Project menu > References sub-menu.

Other than that, I'm not sure what could be going wrong. Are you using Windows Vista perhaps? I've only tested the code with Windows XP.



Back to Top
WaleedSeada View Drop Down
Groupie
Groupie
Avatar

Joined: 29 March 2007
Location: Egypt
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaleedSeada Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2007 at 6:10am
Hello jpbro,
 
It works , the commandbars was private, thanks
 
Thanks and best regards
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada
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.187 seconds.