<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Persisting Customizati&#111;n settings</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Persisting Customizati&#111;n settings]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 10:43:02 +0000</pubDate>
  <lastBuildDate>Tue, 01 Feb 2005 16:25:20 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=611</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Persisting Customizati&#111;n settings : I think I discovered the problem.  I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=4935&amp;title=persisting-customization-settings#4935</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=658">dajv</a><br /><strong>Subject:</strong> 611<br /><strong>Posted:</strong> 01 February 2005 at 4:25pm<br /><br />I think I discovered the problem.<br /><br />I have a generic function that loads the CommandBars since my application makes use of many different CommandBars. In this function I was calling CommandBars.EnableCustomization(), passing whether or not the CommandBar should be customisable. Most of the CommandBars that call this generic function set this to  true. In the problem described above, I was talking about a single CommandBars object on a form that always set CommandBars.EnableCustomization() to true via this generic function.<br /><br />I found that if I removed the call to CommandBars.EnableCustomization() the CommandBars were saved correctly every time. EnableCustomization() therefore seems to be to blame. The fix seems to be to avoid using EnableCustomization().<br /><br />After removing the call to EnableCustomization(), the CommandBars are saved correctly both to the registry and to a file using Load/SaveStateFromString]]>
   </description>
   <pubDate>Tue, 01 Feb 2005 16:25:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=4935&amp;title=persisting-customization-settings#4935</guid>
  </item> 
  <item>
   <title><![CDATA[Persisting Customizati&#111;n settings : After getting the LoadCommandBars/SaveCommandBars...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=4915&amp;title=persisting-customization-settings#4915</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=658">dajv</a><br /><strong>Subject:</strong> 611<br /><strong>Posted:</strong> 01 February 2005 at 12:47am<br /><br />After getting the LoadCommandBars/SaveCommandBars  functions to work after discovering the above, I have noticed that in my application, the CommandBars state is only saved every other time SaveCommandBars is called. I am experiencing the following:<br /><br />(I call LoadCommandBars and SaveCommandBars when my application starts and closes, and I can confirm these calls are being made and not being skipped over by some logic in my application.)<br /><br />1) I open my application, make a change to the menus and close it.<br />2) I reopen my application. The menu layout has been saved. I close my application<br />3) I open my application again, and the menu layout is lost.<br />4) See 1).<br /><br />After discovering that the CommandBars actually save the customisation configuration partly to the registry and partly to the MyApplication.exe-layout file, I decided to save and load the layout using LoadStateFromString and SaveStateToString. After making this change, the above 4 steps result in the same behaviour as when I was letting CommandBars save it to the registry.<br /><br />I can see that after step 2), the file I write out the string returned from SaveStateToString() is only 2 KB and not ~66 KB as it is after step 1).<br /><br />Any ideas on what might be happening here?<br /><br />Any advice is appreciated.<br /><br /><br />Thanks<br /><br />]]>
   </description>
   <pubDate>Tue, 01 Feb 2005 00:47:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=4915&amp;title=persisting-customization-settings#4915</guid>
  </item> 
  <item>
   <title><![CDATA[Persisting Customizati&#111;n settings : A trap to watch out for that I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=4914&amp;title=persisting-customization-settings#4914</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=658">dajv</a><br /><strong>Subject:</strong> 611<br /><strong>Posted:</strong> 31 January 2005 at 10:46pm<br /><br />A trap to watch out for that I just discovered: the LoadCommandBars/SaveCommandBars functions won't work if you have set EnabledCustomization to False against the *.xcb file in the Xtreme CommandBars Designer application (they do save to registry but the comandbars remain unaffected next time you call LoadCommandBars).<br /><br />This is regardless of whether you call CommandBars.EnabledCustomization(). Not sure if this is the intended behaviour but its undocumented (until now!  <img border="0" src="http://forum.codejock.com/smileys/smiley1.gif" border="0"> )]]>
   </description>
   <pubDate>Mon, 31 Jan 2005 22:46:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=4914&amp;title=persisting-customization-settings#4914</guid>
  </item> 
  <item>
   <title><![CDATA[Persisting Customizati&#111;n settings : amazingly enough this works perfectly...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=1588&amp;title=persisting-customization-settings#1588</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=427">blockwood</a><br /><strong>Subject:</strong> 611<br /><strong>Posted:</strong> 08 April 2004 at 11:33pm<br /><br />amazingly enough this works perfectly - with two lines of code!  i expected user would have to write specific routine to persist and then retrieve. thx again]]>
   </description>
   <pubDate>Thu, 08 Apr 2004 23:33:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=1588&amp;title=persisting-customization-settings#1588</guid>
  </item> 
  <item>
   <title><![CDATA[Persisting Customizati&#111;n settings : You can save the settings to the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=1585&amp;title=persisting-customization-settings#1585</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 611<br /><strong>Posted:</strong> 08 April 2004 at 11:15pm<br /><br /><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>You can save the settings to the system registry:</FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2></FONT>&nbsp;</P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>Private Sub Form_Load()</FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2></FONT></P><FONT size=2><FONT face="Times New Roman, Times, serif"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>‘Create CommandBar, then load settings</FONT></FONT><P></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.LoadCommandBars "App Name", App.Title, "Layout"</FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>End Sub</FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=2><FONT face="Times New Roman, Times, serif">&nbsp;<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></FONT></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>Private Sub Form_Unload(Cancel As Integer)</FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>&nbsp;<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;<FONT face="Times New Roman, Times, serif">&nbsp; </FONT></SPAN><FONT face="Times New Roman, Times, serif">CommandBars.SaveCommandBars "App Name", App.Title, "Layout"</FONT></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>&nbsp;<SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">End Sub</SPAN><BR></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT face="Times New Roman, Times, serif" size=2>Or you can save the commandbar settings&nbsp;to a string and place that string in a file.&nbsp; You can them load/save the settings to that file.&nbsp; I can post some code to do this if you don't like the registry version.</FONT></P><span style="font-size:10px"><br /><br />Edited by SuperMario</span>]]>
   </description>
   <pubDate>Thu, 08 Apr 2004 23:15:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=1585&amp;title=persisting-customization-settings#1585</guid>
  </item> 
  <item>
   <title><![CDATA[Persisting Customizati&#111;n settings : what is the best way to persist...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=1582&amp;title=persisting-customization-settings#1582</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=427">blockwood</a><br /><strong>Subject:</strong> 611<br /><strong>Posted:</strong> 08 April 2004 at 10:12pm<br /><br />what is the best way to persist (and retrieve) a user's toolbar customization?<br /><br />i need to persist the info on either an event trigged when user customizes the toolbar or on application close.<br /><br />I also need to read the persisted values when I recreate the toolbar with code on next application load.<br /><br />i have code in Customization event to load up the controls in customization dialog so users can customize their toolbars.  but all is lost when the app. closes and user would have to do it again each time.<br /><br />]]>
   </description>
   <pubDate>Thu, 08 Apr 2004 22:12:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=611&amp;PID=1582&amp;title=persisting-customization-settings#1582</guid>
  </item> 
 </channel>
</rss>