<?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 : SaveSatateToXMLString...</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : SaveSatateToXMLString...]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 11 Jun 2026 16:36:35 +0000</pubDate>
  <lastBuildDate>Tue, 27 May 2008 07:44:34 +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=10774</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[SaveSatateToXMLString... : Hi, Right. by default SaveStateToXMLString...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35851&amp;title=savesatatetoxmlstring#35851</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 10774<br /><strong>Posted:</strong> 27 May 2008 at 7:44am<br /><br /><P>Hi,</P><DIV>Right. by default SaveStateToXMLString don't save controls state.</DIV><DIV>&nbsp;</DIV><DIV>Create Options and set SerializeControls&nbsp; property:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; Dim op As StateOptions<BR>&nbsp;&nbsp;&nbsp; Set op = CommandBars.CreateStateOptions<BR>&nbsp;&nbsp;&nbsp; op.SaveOriginalControls =&nbsp;True<BR>&nbsp;&nbsp;&nbsp; op.SerializeControls = True</DIV>]]>
   </description>
   <pubDate>Tue, 27 May 2008 07:44:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35851&amp;title=savesatatetoxmlstring#35851</guid>
  </item> 
  <item>
   <title><![CDATA[SaveSatateToXMLString... : would you check this method?  as...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35834&amp;title=savesatatetoxmlstring#35834</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4193">suja</a><br /><strong>Subject:</strong> 10774<br /><strong>Posted:</strong> 27 May 2008 at 1:10am<br /><br />would you check this method? <DIV>as i mentioned the Button State&nbsp;was not set .... </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>i want to save the state from each users. and Load that state... </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>'Load the State of CommandBar </DIV><DIV><BR>Public Sub CommandBar_LoadState(ByVal argIDNumber As String, ByVal argEXEName As String)<BR>&nbsp;&nbsp;&nbsp; <BR>On Error Resume Next</DIV><DIV>&nbsp;&nbsp;&nbsp; Dim FreeF As Integer, sFile As String, sLayout As String<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; strsql = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT String From DockingpaneState "<BR>&nbsp;&nbsp;&nbsp; strsql = strsql &amp; "&nbsp; WHERE UserID&nbsp; = '" &amp; Trim$(argIDNumber) &amp; "' "<BR>&nbsp;&nbsp;&nbsp; strsql = strsql &amp; "&nbsp;&nbsp;&nbsp; AND EXEName = '" &amp; UCase(argEXEName) &amp; "' "<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Not OpenADO1(strsql) Then Exit Sub<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; sFile = "c:\" &amp; Trim$(argIDNumber) &amp; ".txt"<BR>&nbsp;&nbsp;&nbsp; FreeF = FreeFile<BR>&nbsp;&nbsp;&nbsp; Kill sFile<BR>&nbsp;&nbsp;&nbsp; Open sFile For Binary As #FreeF<BR>&nbsp;&nbsp;&nbsp; Put #FreeF, , Trim$(AdoRs1("String"))<BR>&nbsp;&nbsp;&nbsp; Close #FreeF<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; AdoRs1.Close<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; sLayout = Space(FileLen(sFile))<BR>&nbsp;&nbsp;&nbsp; Open sFile For Binary As #FreeF<BR>&nbsp;&nbsp;&nbsp; Get #FreeF, , sLayout<BR>&nbsp;&nbsp;&nbsp; Close #FreeF<BR>&nbsp;&nbsp;&nbsp; On Error GoTo 0<BR>&nbsp;&nbsp;&nbsp; CommandBars.LoadStateFromXMLString CommandBars.name, sLayout&nbsp; ' sLayout, "a"<BR>&nbsp;&nbsp;&nbsp; Kill sFile<BR>&nbsp; <BR>End Sub</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>'Save the State of CommandBar <BR>Public Sub DockingPane_SaveState(ByVal argIDNumber As String, ByVal argEXEName As String)<BR>Dim nCnt As Integer<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; strsql = "SELECT count(*) as cnt From DockingpaneState "<BR>&nbsp;&nbsp;&nbsp; strsql = strsql &amp; "&nbsp; WHERE UserID&nbsp; = '" &amp; Trim$(argIDNumber) &amp; "' "<BR>&nbsp;&nbsp;&nbsp; strsql = strsql &amp; "&nbsp;&nbsp;&nbsp; AND EXEName = '" &amp; UCase(argEXEName) &amp; "' "<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Call OpenADO1(strsql)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; nCnt = AdoRs1("Cnt")<BR>&nbsp;&nbsp;&nbsp; AdoRs1.Close<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If nCnt = 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strsql = "Insert into DockingpaneState values ( "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strsql = strsql &amp; " '" &amp; Trim$(UserID.IDNumber) &amp; "', "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strsql = strsql &amp; " '" &amp; UCase(argEXEName) &amp; "', "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'strsql = strsql &amp; " '" &amp; Trim$(NurseMDI.DockingPaneManager.SaveStateToString) &amp; "') "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strsql = strsql &amp; " '" &amp; Trim$(NurseMDI.CommandBars.SaveStateToXMLString(NurseMDI.CommandBars.name)) &amp; "' "<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strsql = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UPDATE DockingpaneState "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'strsql = strsql &amp; "&nbsp;&nbsp;&nbsp; Set string&nbsp; = '" &amp; Trim$(NurseMDI.DockingPaneManager.SaveStateToString) &amp; "' "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'strsql = strsql &amp; "&nbsp;&nbsp;&nbsp; Set string&nbsp; = '" &amp; Trim$(NurseMDI.CommandBars.SaveStateToString(True, True)) &amp; "' "<BR>&nbsp;&nbsp;&nbsp; strsql = strsql &amp; "&nbsp;&nbsp;&nbsp; Set string&nbsp; = '" &amp; Trim$(NurseMDI.CommandBars.SaveStateToXMLString(NurseMDI.CommandBars.name)) &amp; "' "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strsql = strsql &amp; "&nbsp; WHERE UserID = '" &amp; Trim$(argIDNumber) &amp; "' "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strsql = strsql &amp; "&nbsp;&nbsp;&nbsp; AND EXEName = '" &amp; UCase(argEXEName) &amp; "' "<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; AdoCn.BeginTrans<BR>&nbsp;&nbsp;&nbsp; If ExecADO(strsql) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AdoCn.CommitTrans<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AdoCn.RollbackTrans<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub<BR></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&#091;this is get from saved file&#093;</DIV><DIV>&nbsp;</DIV><DIV>&lt;CommandBars CompactMode="1"&gt;<BR>&nbsp; &lt;Layout&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;DockState Version="21" ScreenSize="1280, 1024" Count="2"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;BarInfo0 BarId="1" MRUWidth="32767"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;BarInfo1 BarId="1694431857" Floating="1" MRUWidth="32767" PointPos="529, 238" <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MRUDockPos="545, 18, 1113, 44" MRUFloatPos="529, 238"/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/DockState&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;DockBars&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DockBar0 Count="3" Id1="1"/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/DockBars&gt;<BR>&nbsp; &lt;/Layout&gt;<BR>&lt;/CommandBars&gt;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 27 May 2008 01:10:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35834&amp;title=savesatatetoxmlstring#35834</guid>
  </item> 
  <item>
   <title><![CDATA[SaveSatateToXMLString... : Splendid!  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35796&amp;title=savesatatetoxmlstring#35796</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2090">joeliner</a><br /><strong>Subject:</strong> 10774<br /><strong>Posted:</strong> 26 May 2008 at 9:59am<br /><br /><img src="http://forum.codejock.com/smileys/smiley32.gif" border="0" align="absmiddle"> Splendid!]]>
   </description>
   <pubDate>Mon, 26 May 2008 09:59:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35796&amp;title=savesatatetoxmlstring#35796</guid>
  </item> 
  <item>
   <title><![CDATA[SaveSatateToXMLString... : Yes. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35793&amp;title=savesatatetoxmlstring#35793</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 10774<br /><strong>Posted:</strong> 26 May 2008 at 9:51am<br /><br />Yes.]]>
   </description>
   <pubDate>Mon, 26 May 2008 09:51:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35793&amp;title=savesatatetoxmlstring#35793</guid>
  </item> 
  <item>
   <title><![CDATA[SaveSatateToXMLString... : Just a quick one oleg,as earlier...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35781&amp;title=savesatatetoxmlstring#35781</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2090">joeliner</a><br /><strong>Subject:</strong> 10774<br /><strong>Posted:</strong> 26 May 2008 at 2:00am<br /><br />Just a quick one oleg,<br><br>as earlier mentioned, we will have the ribbonbar designer in 12.1 (correct me if am wrong). will there be a feature of importing xml generated from ribbonbar to the designer?<br><br><br>]]>
   </description>
   <pubDate>Mon, 26 May 2008 02:00:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35781&amp;title=savesatatetoxmlstring#35781</guid>
  </item> 
  <item>
   <title><![CDATA[SaveSatateToXMLString... : Hello,  Check that you give...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35772&amp;title=savesatatetoxmlstring#35772</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 10774<br /><strong>Posted:</strong> 26 May 2008 at 1:10am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Check that you give same string to LoadStateFromXMLString that you get from Save. Maybe you save it wrong.</DIV>]]>
   </description>
   <pubDate>Mon, 26 May 2008 01:10:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35772&amp;title=savesatatetoxmlstring#35772</guid>
  </item> 
  <item>
   <title><![CDATA[SaveSatateToXMLString... : Hi~~  Help me   i want to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35768&amp;title=savesatatetoxmlstring#35768</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4193">suja</a><br /><strong>Subject:</strong> 10774<br /><strong>Posted:</strong> 26 May 2008 at 12:14am<br /><br /><DIV>Hi~~</DIV><DIV>&nbsp;</DIV><DIV>Help me <img src="https://forum.codejock.com/smileys/smiley19.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>i want to set the State by using </DIV><DIV>SaveStateToXMLString/LoadStateFromXMLString..</DIV><DIV>&nbsp;</DIV><DIV>when i clicked "Add or Remove Button" and&nbsp;&nbsp;Saved the State ,</DIV><DIV>the Button State&nbsp;was not set .... </DIV><DIV>&nbsp;</DIV><DIV>but When i used the RegistryKey, the Button State was Set.. </DIV><DIV>&nbsp;</DIV><DIV>is there diffrence from Using Xml and RegistryKey ??</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 26 May 2008 00:14:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10774&amp;PID=35768&amp;title=savesatatetoxmlstring#35768</guid>
  </item> 
 </channel>
</rss>