Disable Toolbar Customize Programatically

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Disable Toolbar Customize Programatically

Post by docu-track99 »

Is it possible to disable the new toolbar customization feature programatically?

As in we'd like to make a custom toolbar, save the configuration, load it on our user's machines, and disable the option for them to make changes to what's on the toolbars (the individual buttons, not which toolbars are shown or the order of them on the command bar.)
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2449
Joined: Thu Jun 30, 2005 4:11 pm

Re: Disable Toolbar Customize Programatically

Post by Vasyl - PDF-XChange »

You can use for this:
SetProperty("View.LockAllBars", 1, 0);
SetProperty("Commands["LockAllCmdBars"].State", "Offline", 0);
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Disable Toolbar Customize Programatically

Post by docu-track99 »

Thank you very much!

Didn't work the exact way I wanted, but pointed me towards what I wanted to do.
nais1
User
Posts: 17
Joined: Fri Jun 05, 2009 7:08 am

Re: Disable Toolbar Customize Programatically

Post by nais1 »

hello

<question>
1. tell me VB.NET code of next code.
SetProperty("Commands["LockAllCmdBars"].State", "Offline", 0);

2. i have to write next 2 code?
SetProperty("View.LockAllBars", 1, 0);
SetProperty("Commands["LockAllCmdBars"].State", "Offline", 0);

3. i would like to hide find tool bar's customize function too.

4. i would like hide context menu.
but i found that it appear after i clicked zoom and pan tool.

regards,
nais1
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Disable Toolbar Customize Programatically

Post by Corwin - Tracker Sup »

Hi

<answer>
1. AxCoPDFXCview1.SetProperty("Commands[""LockAllCmdBars""].State", "Offline", 0)
2. If you want to lock all toolbars then yes.
3. LockAllCmdBars command will deny any customization of any toolbar.
4. What exactly context menu you want to hide?

HTH
nais1
User
Posts: 17
Joined: Fri Jun 05, 2009 7:08 am

Re: Disable Toolbar Customize Programatically

Post by nais1 »

i wrote VB.NET code as following.
i would like to set disable on the any toolbar's customize function and context menu.
but context menu appered when i left-clicked on PDF after i right-click on "pan & zoom menuitem"

>4. What exactly context menu you want to hide?
AxCoPDFXCview1.SetProperty("View.LockAllBars", 1, 0)
AxCoPDFXCview1.SetProperty("Commands[""LockAllCmdBars""].State", "Offline", 0)
func_PDF(33132) 'context menu off

regards,
nais1
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Disable Toolbar Customize Programatically

Post by Corwin - Tracker Sup »

You can disble all context menu by using next code:
AxCoPDFXCview1.SetProperty("General.DenyAllContextMenus", 1, 0);
nais1
User
Posts: 17
Joined: Fri Jun 05, 2009 7:08 am

Re: Disable Toolbar Customize Programatically

Post by nais1 »

thanks for your support.
i finally set disable the context menu.

nais1
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Disable Toolbar Customize Programatically

Post by John - Tracker Supp »

Excellent - thanks nais1.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com