Print Page | Close Window

Hide "Customize Quick Access Toolbar" Button

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=5319
Printed Date: 12 May 2024 at 3:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Hide "Customize Quick Access Toolbar" Button
Posted By: DDJJ
Subject: Hide "Customize Quick Access Toolbar" Button
Date 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
 



Replies:
Posted By: Oleg
Date 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


Posted By: ijwelch
Date 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?


Posted By: SuperMario
Date Posted: 24 October 2006 at 11:13am
will be added for 10.4


Posted By: Waescher
Date Posted: 09 January 2007 at 6:13am
I'm sorry... I found no way to do this in 10.4 Demo.
Any suggestions?


Posted By: herbat
Date Posted: 09 January 2007 at 1:06pm
try to use ControlQuickAccess method like
   
RibbonBar.ControlQuickAccess.Visible = False


-------------
Adam


Posted By: Waescher
Date Posted: 15 January 2007 at 6:48am
No, I'm sorry.
That doesn't work...


Posted By: Oleg
Date 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


Posted By: Waescher
Date 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...




Posted By: jpbro
Date 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.




Posted By: Oleg
Date 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


Posted By: jpbro
Date 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


Posted By: Waescher
Date 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!
member_profile.asp?PF=2676&FID=24 -


Posted By: jpbro
Date 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.



Posted By: WaleedSeada
Date 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


Posted By: jpbro
Date 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).


Posted By: WaleedSeada
Date 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


Posted By: jpbro
Date 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.


Posted By: WaleedSeada
Date 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


Posted By: jpbro
Date 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.





Posted By: WaleedSeada
Date 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



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