<?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 : Sticky floating position?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Sticky floating position?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 15 Jun 2026 02:00:14 +0000</pubDate>
  <lastBuildDate>Tue, 26 May 2009 12:59:38 +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=14369</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[Sticky floating position? : Here is how I do it: (this works...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14369&amp;PID=49342&amp;title=sticky-floating-position#49342</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3253">Mr.Den</a><br /><strong>Subject:</strong> 14369<br /><strong>Posted:</strong> 26 May 2009 at 12:59pm<br /><br /><DIV>Here is how I do it: (this works for me, your mileage may vary <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0">)</DIV><DIV><strong><U></U></strong>&nbsp;</DIV><DIV><strong><U>Put in the declarations of a form:</U></strong></DIV><DIV>&nbsp;</DIV><DIV>Private Const ID_BAR_TEST = 200</DIV><DIV>&nbsp;</DIV><DIV><strong><U>Create the command bar:</U></strong></DIV><P>private sub SetUpCommandBars</P><P>Dim obBar As CommandBar</P><P>on error goto errHandler<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set obBar = CommandBars.Add("Test Bar", xtpBarFloating)<BR>&nbsp;&nbsp;&nbsp; obBar.BarID = ID_BAR_TEST<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'add controls to bar <BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CommandBars.DockToolBar obBar, 10, 800, xtpBarFloating<BR>&nbsp;&nbsp;&nbsp; <BR>errHandler:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Err.Number Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox Err.Number &amp; ", " &amp; Err.Description, vbCritical , "SetUpCommandBars"<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set obBar = Nothing</P><P>End Sub</P><DIV><strong><U>Use this to move the Commandbar:</U></strong></DIV><DIV>&nbsp;</DIV><DIV><DIV></DIV><DIV>Private Sub TestDockToolBar()</DIV><DIV>&nbsp;</DIV><DIV>Dim obBar As CommandBar</DIV><DIV>&nbsp;</DIV><DIV>On Error GoTo errHandler<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; For Each obBar In obCommandBars<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If obBar.BarID = ID_BAR_TEST Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; obCommandBars.DockToolBar obBar, 900, 900, xtpBarFloating<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Next<BR>&nbsp;&nbsp;&nbsp; <BR>errHandler:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Err.Number Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShowErrorM Err.Number, Err.Description, "TestDockToolBar"<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set obBar = Nothing</DIV><DIV>&nbsp;&nbsp;&nbsp; </DIV><DIV>End Sub</DIV></DIV><P>You can change the hard coded numbers in the TestDockToolBar/DockToolBar command&nbsp;to variables that you set when changing from floating to docked, it should do what you need.</P><P>&nbsp;Thanks to Aaron for giving me the tip on the DockToolBar function <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0"></P>]]>
   </description>
   <pubDate>Tue, 26 May 2009 12:59:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14369&amp;PID=49342&amp;title=sticky-floating-position#49342</guid>
  </item> 
  <item>
   <title><![CDATA[Sticky floating position? : My application allows the user...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14369&amp;PID=49292&amp;title=sticky-floating-position#49292</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5257">uiguy</a><br /><strong>Subject:</strong> 14369<br /><strong>Posted:</strong> 23 May 2009 at 8:38am<br /><br />My application allows the user to toggle individual toolbars between docked state and floating state.&nbsp; I have implemented this by toggling the CommandBar's Position property between xtpBarFloating or xtpBarTop.&nbsp; My problem is that the CommandBar does not remember its floating position.&nbsp;Consider these steps taken by the user:<DIV>&nbsp;</DIV><DIV>- moves the floating toolbar to position 500, 600 on the screen</DIV><DIV>- docks the toolbar (via a dialog that sets Position to xtpBarTop)</DIV><DIV>- undocks the toolbar (via dialog that set the Position to xtpBarFloating)</DIV><DIV>- the toolbar is now position to the upper left portion of the screen, no where near the "last floating" position</DIV><DIV>&nbsp;</DIV><DIV>Is there a remedy for this?&nbsp; When the user undocks the toolbar via the dialog, I want it to show in the same position it was when it was last floating.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 23 May 2009 08:38:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14369&amp;PID=49292&amp;title=sticky-floating-position#49292</guid>
  </item> 
 </channel>
</rss>