<?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 : Menubar width</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Menubar width]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 13:48:54 +0000</pubDate>
  <lastBuildDate>Mon, 08 Aug 2005 13:41:29 +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=2675</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[Menubar width : Oleg, Yes it seems like the toolbar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8057&amp;title=menubar-width#8057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1367">ddebono</a><br /><strong>Subject:</strong> 2675<br /><strong>Posted:</strong> 08 August 2005 at 1:41pm<br /><br /><P>Oleg,</P><P>Yes it seems like the toolbar is already wrapped, and there no way to turn it off.</P><P>But the same thing also happens with the menu bar even though wrapping is turned off.</P><P>You should look more into this.</P>]]>
   </description>
   <pubDate>Mon, 08 Aug 2005 13:41:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8057&amp;title=menubar-width#8057</guid>
  </item> 
  <item>
   <title><![CDATA[Menubar width : GetWindowRect retruns current...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8030&amp;title=menubar-width#8030</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2675<br /><strong>Posted:</strong> 07 August 2005 at 1:29am<br /><br /><P>GetWindowRect retruns current Width... I think Toolbar already wrapped so it returns wrapped Width of toolbar.</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Sun, 07 Aug 2005 01:29:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8030&amp;title=menubar-width#8030</guid>
  </item> 
  <item>
   <title><![CDATA[Menubar width : Hi, Stretch flag is this the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8026&amp;title=menubar-width#8026</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1367">ddebono</a><br /><strong>Subject:</strong> 2675<br /><strong>Posted:</strong> 06 August 2005 at 6:36am<br /><br /><P>Hi,</P><P>Stretch flag is this the xtpFlagHideWrap ?</P><P>You example does not work. It still reports a much narrower width than needed. It seems that it reports no wider than the actual form width.</P><P>What I use it for is when the fontsize and icon size goes from normal to large. And then find the width necessary.</P><P>Private Sub FixMenuMode()</P><P>Dim fntTmp As StdFont</P><P>&nbsp;&nbsp;&nbsp; On Error GoTo Hell</P><P>&nbsp;&nbsp;&nbsp; Set fntTmp = Me.Font<BR>&nbsp;&nbsp;&nbsp; fntTmp.name = "Tahoma"<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If objOptions.BigMenusIcons Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.LargeIcons = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.SetIconSize True, 48, 48<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.SetIconSize False, 24, 24<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.SetPopupIconSize 48, 48<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fntTmp.Size = 14<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set CommandBars.Options.Font = fntTmp<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.LargeIcons = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.SetIconSize False, 24, 24<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.SetIconSize True, 48, 48<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.Options.SetPopupIconSize 24, 24<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fntTmp.Size = 8.25<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set CommandBars.Options.Font = fntTmp<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Me.width &lt; FindMenuWidth Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.width = FindMenuWidth<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; Form_Resize<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Exit Sub</P><P>Hell:<BR>&nbsp;&nbsp;&nbsp; ShowError "frmShow Sub FixMenuMode"<BR>End Sub<BR></P><P>Private Function FindMenuWidth() As Long</P><P>Dim lLeft As Long<BR>Dim lRight As Long<BR>Dim lTop As Long<BR>Dim lBottom As Long<BR>Dim lLeft1 As Long<BR>Dim lRight1 As Long<BR>Dim lBottom1 As Long<BR>Dim lTop1 As Long<BR>Dim lWidth As Long</P><P>&nbsp;&nbsp;&nbsp; On Error GoTo Hell</P><P>&nbsp;&nbsp;&nbsp; CommandBars.ActiveMenuBar.EnableDocking xtpFlagHideWrap<BR>&nbsp;&nbsp;&nbsp; ' Toolbar is the tolbar control of the commandbars<BR>&nbsp;&nbsp;&nbsp; Toolbar.EnableDocking xtpFlagHideWrap<BR></P><P>&nbsp;&nbsp;&nbsp; CommandBars.RecalcLayout<BR>&nbsp;&nbsp;&nbsp; CommandBars.ActiveMenuBar.GetWindowRect lLeft, lTop, lRight, lBottom<BR>&nbsp;&nbsp;&nbsp; Toolbar.GetWindowRect lLeft1, lTop1, lRight1, lBottom1<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If lRight1 &gt; lRight Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lWidth = lRight1 - lLeft1<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lWidth = lRight - lLeft<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; FindMenuWidth = lWidth + (15 * lTwipsPerPixelX)</P><P>&nbsp;&nbsp;&nbsp; Exit Function</P><P>Hell:<BR>&nbsp;&nbsp;&nbsp; ShowError "frmShow Function FindMenuWidth"<BR>End Function<BR></P><span style="font-size:10px"><br /><br />Edited by ddebono</span>]]>
   </description>
   <pubDate>Sat, 06 Aug 2005 06:36:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8026&amp;title=menubar-width#8026</guid>
  </item> 
  <item>
   <title><![CDATA[Menubar width : You must disable stretch flag...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8021&amp;title=menubar-width#8021</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2675<br /><strong>Posted:</strong> 05 August 2005 at 11:42pm<br /><br /><P>You must disable stretch flag first.</P><P>&nbsp;</P><P>&nbsp;&nbsp;&nbsp; CommandBars.ActiveMenuBar.EnableDocking xtpFlagHideWrap<BR>&nbsp;&nbsp;&nbsp; CommandBars.RecalcLayout<BR>&nbsp;&nbsp;&nbsp; Dim L As Long, T As Long, R As Long, B As Long<BR>&nbsp;&nbsp;&nbsp; CommandBars.ActiveMenuBar.GetWindowRect L, T, R, B<BR>&nbsp;&nbsp;&nbsp; Const FrameBorder = 120<BR>&nbsp;&nbsp;&nbsp; Me.Width = R - L + FrameBorder</P>]]>
   </description>
   <pubDate>Fri, 05 Aug 2005 23:42:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8021&amp;title=menubar-width#8021</guid>
  </item> 
  <item>
   <title><![CDATA[Menubar width : Thanks,  The EnableDocking worked,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8003&amp;title=menubar-width#8003</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1367">ddebono</a><br /><strong>Subject:</strong> 2675<br /><strong>Posted:</strong> 04 August 2005 at 3:51pm<br /><br /><P>Thanks,</P><P>&nbsp;</P><P>The EnableDocking worked, but not the GetWindowRect.</P><P>The reason is that if the form is narrower than a toolbar, the GetWindowRect will report the actual left and right, and not the ones needed for non-clipping of the toolbar.</P><P>Maybe a GetWindowNonClipping function or something ?</P>]]>
   </description>
   <pubDate>Thu, 04 Aug 2005 15:51:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=8003&amp;title=menubar-width#8003</guid>
  </item> 
  <item>
   <title><![CDATA[Menubar width : 1. Try GetWindowRect method. 2....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=7983&amp;title=menubar-width#7983</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2675<br /><strong>Posted:</strong> 03 August 2005 at 4:54am<br /><br /><P>1. Try GetWindowRect method.</P><P>2. EnableDocking method + xtpFlagHideWrap</P>]]>
   </description>
   <pubDate>Wed, 03 Aug 2005 04:54:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=7983&amp;title=menubar-width#7983</guid>
  </item> 
  <item>
   <title><![CDATA[Menubar width : How to find the width that the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=7974&amp;title=menubar-width#7974</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1367">ddebono</a><br /><strong>Subject:</strong> 2675<br /><strong>Posted:</strong> 02 August 2005 at 5:37pm<br /><br /><P>How to find the width that the windows has to be to fit the menubar/commandbar ?</P><P>And is it possible to turn off the menubar wrapping when the windows gets to narrow?</P>]]>
   </description>
   <pubDate>Tue, 02 Aug 2005 17:37:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2675&amp;PID=7974&amp;title=menubar-width#7974</guid>
  </item> 
 </channel>
</rss>