Is there any case where you could think that would cause the SaveUserSettings call to take a long time?

It was taking 15 seconds on my machine and unfortunately I did not save the existing registry settings but once I deleted the existing registry key it went back to only taking about 0.4 seconds? Anything that you can think of that would severely slow down the SaveUserSettings call to the registry? I'm kicking myself for not thinking to save the existing data first to try to reproduce it.

Probably there was some interference (for example some antivirus or any other program that monitor the registry) before you removed that key.
Also, we don't recommend saving settings to registry - better save it to the file on disk - it's much easier to manage it.

Cheers,
Alex

Join us at Google+:https://plus.google.com/+PDFXChangeEditorTSSubscribe at:https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Luckily it was doing it on my surface tablet although not as bad. I tracked it down to it's writing over 20,000 entries into the CmdLayouts\Classic\Bars values and adding to it every time I issue the SaveSettings call it looks like. I can't find any reference to CmdLayouts in our code so I'm guessing it's something you guys are doing in your code. I'll try to see if I can't make a sample to reproduce what it is doing but it looks like once you disable the Ribbon UI it starts causing it to happen.

Here's a VB6 Sample App to prove it's not due to any legacy settings in the Registry. It looks like in Classic Mode when you hide commandbars it causes it.

If I run Test2 it runs 10 saves and if you run it once and check the registry then run it again you will see that it increased the count. On mine it goes from 32 the first run to 49 to 66, to 83. Now the strange thing is if I close the program and restart it then it clears out the values from HKEY_CURRENT_USER\Software\MySoftware\TestClassic\CmdLayouts\Classic\Bars and your back at 32 after it does the 10 save loop. But in our own program I'm not seeing that even.

So I'm not sure if it's not releasing some registry keys after writing them or if the count is off to remove the keys.

Also I did some more testing and it looks like the values are cached since the LoadSettings most likely. It looks like there are 17 keys the first time I save it that get written without a t.ID string value in them, hence why it keeps incrementing up by 17 it seams.

- problem is with that code:
- it cannot handle custom bars, made by user
- it adds many redundant records to Classic\Bars array that doesn't represent real bars. for example, following ids:
cmdbar.commenting.part1, cmdbar.commenting.part2, cmdbar.commenting.part3, cmdbar.commenting.part4, cmdbar.commenting.part5, cmdbar.commenting.part6 - aren't ids of regular bars but parts of bars, unfortunately, even each of them is from cmdbar.first - cmdbar.last range.
- this method doesn't work for bars inside ribbon tabs. IDs of standard bars inside ribbon tabs have "rbar." prefix.

HTH.

Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.

The downloads have not been updated and have the 322 build in them still.

As for cmd.view.toggleAllCmdBars that's great to toggle but what's the best way to tell if they are going to toggle on or off since some may be off already? I think you're missing functions like
cmd.view.showAllCmdBars
cmd.view.hideAllCmdBars

To match the functionality of the lock/unlock
cmd.view.lockUnlockAllCmdBars
cmd.view.lockAllCmdBars
cmd.view.unlockAllCmdBars

If I try to check the visibility of any cmdbar it always returns true even if it's been toggled off.
PXV_Control1.Inst.IsCmdBarVisible2(AxPXV_Control1.Inst.Str2ID("cmdbar.file", False)

So how do I check the value of if they are toggled on or off?

Also the cmd.view.toggleAllCmdBars does not toggle the cmdbar.menubar. You have to manually do that after calling the PXV_Control1.Inst.ExecUICmd ("cmd.view.toggleAllCmdBars")

PXV_Control1.VisibleCmdBars = 0; // to hide all toolbars
PXV_Control1.VisibleCmdBars = 3; // to show all toolbars (see new PXV_VisibleCmdBars flags)

About issue with IsCmdBarVisible2. That function returns True when toolbar doesn't contain 'UIX_CmdBarStyle_Hidden' flag in style. But often, even when bar hasn't that flag - it might be invisible according to the global special filter VisibleCmdBars. Problem is that currently the IsCmdBarVisible2 doesn't take into account that filter (the "cmd.toggleAllCmdBars" changes that filter internally). Also it doesn't take into account the VisibleCmdPanes filter. We will fix these problems in the near future.
As workaround - you may check actual visibility state of certain bar:

Thanks. I was unable to get the tec build to work with VB6. Maybe it needs the updated tlb files in it also? I tired registering the dll files but when I tried to bring up a form in VB6 that already had the control on it the VB6 IDE would crash.