<?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 : How to use CreateAsBinaryFile?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : How to use CreateAsBinaryFile?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 16 May 2026 04:53:52 +0000</pubDate>
  <lastBuildDate>Mon, 29 Mar 2010 06:42:43 +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=16536</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[How to use CreateAsBinaryFile? :  hi,i wanna save/load the layout...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16536&amp;PID=57837&amp;title=how-to-use-createasbinaryfile#57837</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4754">Micca</a><br /><strong>Subject:</strong> 16536<br /><strong>Posted:</strong> 29 March 2010 at 6:42am<br /><br />hi,<br><br>i wanna save/load the layout of my 4 commandbars into/from the same binary file.<br><br>I use VB6 with Commandbars 12.1.1 and this is my code for loading and saving to a binary file:<br><br><i>' SAVE<br>Dim pxWrite As PropExchange<br><br>Set pxWrite = XtremeCommandBars.CreatePropExchange<br><br>pxWrite.CreateAsBinaryFile False, App.Path &amp; "\Toolbar.dat"<br>ExchangeState pxWrite, cbrMain<br>ExchangeState pxWrite, cbrDrives<br>ExchangeState pxWrite, cbrFiles<br>ExchangeState pxWrite, cbrReport<br><br>' LOAD<br>Dim pxRead As PropExchange<br>Set pxRead = XtremeCommandBars.CreatePropExchange<br><br>If (pxRead.CreateAsBinaryFile(True, App.Path &amp; "\Toolbar.dat")) Then<br>&nbsp;&nbsp; ExchangeState pxRead, cbrMain<br>&nbsp;&nbsp; ExchangeState pxRead, cbrReport<br>&nbsp;&nbsp; ExchangeState pxRead, cbrDrives<br>&nbsp;&nbsp; ExchangeState pxRead, cbrFiles<br>End If<br><br>Private Sub ExchangeState(ByRef px As PropExchange, ByRef Toolbar As CommandBars)<br><br>Dim pxSection As PropExchange<br>Dim Options As StateOptions<br><br>Set Options = Toolbar.CreateStateOptions<br>Options.SerializeControls = True<br>Options.SaveOnlyCustomized = True<br>Options.SaveOriginalControls = False<br>Options.SerializeOptions = True<br>Options.SerializeLayout = True<br><br>Set pxSection = px.GetSection(Toolbar.name)<br>Toolbar.DoPropExchange pxSection, Options<br><br>End Sub</i><br><br>When loading from the binary file the changes of an toolbar always will be visible at an other toolbar.<br>Let's say i change toolbar cbrMain and save all toolbars. When loading the changes will be visible at toolbar cbrReport.<br><br>Anyone can help?<br><br><br><br><br>]]>
   </description>
   <pubDate>Mon, 29 Mar 2010 06:42:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16536&amp;PID=57837&amp;title=how-to-use-createasbinaryfile#57837</guid>
  </item> 
 </channel>
</rss>