<?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 : For all of interests: Howto ribbon from Designer</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : For all of interests: Howto ribbon from Designer]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 11 Jun 2026 20:03:48 +0000</pubDate>
  <lastBuildDate>Thu, 10 Jul 2008 16:03:45 +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=11381</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[For all of interests: Howto ribbon from Designer : This is correct, but i have posted...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11381&amp;PID=38172&amp;title=for-all-of-interests-howto-ribbon-from-designer#38172</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2531">Baldur</a><br /><strong>Subject:</strong> 11381<br /><strong>Posted:</strong> 10 July 2008 at 4:03pm<br /><br />This is correct, but i have posted only a subset of all, what i do. <DIV>In a manual copy, i check for specific ID's, load a languagetranslation and more.</DIV><DIV>If i use the Copy-Method, i must than use the find-method to do additional things.</DIV><DIV>I think, everybody can make it as he want.</DIV><DIV>For some performance considerations it may be faster to use the copy, but only in milliseconds.</DIV><DIV>&nbsp;</DIV><DIV>When the ribbonbar or ribbon-menu's can be build with a designer, it would be the best solution ;)</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>PS:</DIV><DIV>I use CustomDraw for the reportcontrol to show Minicharts like bars and lines also known as sparklines.</DIV><DIV>My customers are very lucky about that and your ReportControl are the only one, i found, i can do this.</DIV><DIV>&nbsp;</DIV><DIV>Your Controls are the best relationship between costs and functionality.</DIV><DIV>Thanks for your work.</DIV><DIV>&nbsp;</DIV><DIV>In German:</DIV><DIV>Honig ums Maul (honey for the mouth) <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"><img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"><img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV>]]>
   </description>
   <pubDate>Thu, 10 Jul 2008 16:03:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11381&amp;PID=38172&amp;title=for-all-of-interests-howto-ribbon-from-designer#38172</guid>
  </item> 
  <item>
   <title><![CDATA[For all of interests: Howto ribbon from Designer : Thanks for sharing.  Only one...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11381&amp;PID=38153&amp;title=for-all-of-interests-howto-ribbon-from-designer#38153</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 11381<br /><strong>Posted:</strong> 10 July 2008 at 12:44pm<br /><br />Thanks for sharing.<DIV>&nbsp;</DIV><DIV>Only one suggestion - you can try Control.Copy method for CopyControls &nbsp;- it will automatically copy all submenus also.</DIV>]]>
   </description>
   <pubDate>Thu, 10 Jul 2008 12:44:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11381&amp;PID=38153&amp;title=for-all-of-interests-howto-ribbon-from-designer#38153</guid>
  </item> 
  <item>
   <title><![CDATA[For all of interests: Howto ribbon from Designer :  This is for all people, who...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11381&amp;PID=38137&amp;title=for-all-of-interests-howto-ribbon-from-designer#38137</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2531">Baldur</a><br /><strong>Subject:</strong> 11381<br /><strong>Posted:</strong> 10 July 2008 at 9:56am<br /><br /><div>This is for all people, who want a SystemCommand but no ribbon, only simple menus and commandbars:</div><div>&nbsp;</div><div>In Designer i have created a mainmenu, which becomes automatically Id=1 !</div><div></div>All additional Commandbars are designed in Designer as i need.<div>&nbsp;</div><div>Private Sub Form_Load()<br></div><div>&nbsp;&nbsp;&nbsp; Dim xRibbonBar As RibbonBar<br>&nbsp;&nbsp;&nbsp; Dim xSystemPopup As CommandBarPopup<br>&nbsp;&nbsp;&nbsp; Dim xMainMenue As CommandBar</div><div>&nbsp;&nbsp;&nbsp; Dim xRibbonLeft As Long<br>&nbsp;&nbsp;&nbsp; Dim xRibbonRight As Long<br>&nbsp;&nbsp;&nbsp; Dim xRibbonTop As Long<br>&nbsp;&nbsp;&nbsp; Dim xRibbonBottom As Long<br></div><div>&nbsp;&nbsp;&nbsp; With cmdBars<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Options.UseSharedImageList = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .LoadDesignerBars</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set xMainMenue = GetCommandBar(cmdBars, 1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;Find Mainmenu<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xMainMenue.BarID = 1001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;Change ID to prevent conflicts</div><div>&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set xRibbonBar = .AddRibbonBar("System") ' becomes now Id=1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.EnableDocking xtpFlagStretched<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.Title = App.ProductName<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.RemoveAllTabs<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.Customizable = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CopyControls xMainMenue.Controls, xRibbonBar.Controls<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xMainMenue.Delete&nbsp; ' never needed any more<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set xSystemPopup = xRibbonBar.AddSystemButton<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xSystemPopup.IconId = ID_SYSTEM_MENUE ' your Icon here<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xSystemPopup.CommandBar = Nothing&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' only a simple button<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.AllowMinimize = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.AllowQuickAccessCustomization = True<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.EnableFrameTheme<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' now adjust Commandbars to appear under the ribbon and not above the windowscaption !!!</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' the IDR_'s are coming from my designerbars</div><div><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xRibbonBar.GetWindowRect xRibbonLeft, xRibbonTop, xRibbonRight, xRibbonBottom<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .DockToolBar GetCommandBar(cmdBars, IDR_DATE), 0, xRibbonBottom, xtpBarTop<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .DockToolBar GetCommandBar(cmdBars, IDR_KENNZAHL), 0, xRibbonBottom, xtpBarTop<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CmdDockRightOf GetCommandBar(cmdBars, IDR_EXPORT), GetCommandBar(cmdBars, IDR_KENNZAHL), False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CmdDockRightOf GetCommandBar(cmdBars, IDR_LUPE), GetCommandBar(cmdBars, IDR_EXPORT), False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CmdDockRightOf GetCommandBar(cmdBars, IDR_CHARTS), GetCommandBar(cmdBars, IDR_LUPE), False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CmdDockRightOf GetCommandBar(cmdBars, IDR_BEARBEITEN), GetCommandBar(cmdBars, IDR_CHARTS), False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CmdDockRightOf GetCommandBar(cmdBars, IDR_INFO), GetCommandBar(cmdBars, IDR_BEARBEITEN), False<br></div><div>&nbsp;&nbsp;&nbsp; End With<br>End Sub</div><div>&nbsp;</div><div>Public Function GetCommandBar(pCmdBar As XtremeCommandBars.CommandBars, pId As Long) As XtremeCommandBars.CommandBar<br>&nbsp;&nbsp;&nbsp; Dim xI As Integer<br>&nbsp;&nbsp;&nbsp; For xI = 1 To pCmdBar.Count<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If pCmdBar.Item(xI).BarID = pId Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set GetCommandBar = pCmdBar.Item(xI)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit For<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; Next<br>End Function</div><div>&nbsp;</div><div>' This code is from CJ themselves<br></div><div>Private Sub CmdDockRightOf(BarToDock As CommandBar, BarOnLeft As CommandBar, VerticalBar As Boolean)<br>&nbsp;&nbsp;&nbsp;&nbsp; Dim Left As Long<br>&nbsp;&nbsp;&nbsp;&nbsp; Dim Top As Long<br>&nbsp;&nbsp;&nbsp;&nbsp; Dim Right As Long<br>&nbsp;&nbsp;&nbsp;&nbsp; Dim Bottom As Long<br>&nbsp;&nbsp;&nbsp;&nbsp; Dim LeftBar As CommandBar<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; Set LeftBar = BarOnLeft<br>&nbsp;&nbsp;&nbsp;&nbsp; cmdBars.RecalcLayout<br>&nbsp;&nbsp;&nbsp;&nbsp; BarOnLeft.GetWindowRect Left, Top, Right, Bottom<br>&nbsp;&nbsp;&nbsp;&nbsp; LeftBar.GetWindowRect Left, Top, Right, Bottom<br>&nbsp;&nbsp;&nbsp;&nbsp; If (VerticalBar = False) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdBars.DockToolBar BarToDock, Right, (Bottom + Top) / 2, LeftBar.Position<br>&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdBars.DockToolBar BarToDock, (Left + Right) / 2, Bottom, LeftBar.Position<br>&nbsp;&nbsp;&nbsp;&nbsp; End If<br>End Sub</div><div>&nbsp;</div><div>' Copy a Tree of controls</div><div>Private Sub CopyControls(FromControls As CommandBarControls, ToControls As CommandBarControls)<br>&nbsp;&nbsp;&nbsp; Dim xControlBar As CommandBarControl<br>&nbsp;&nbsp;&nbsp; Dim xAddControl As CommandBarControl<br>&nbsp;&nbsp;&nbsp; Dim xControlPopup As CommandBarPopup<br>&nbsp;&nbsp;&nbsp; Dim xFromPopup As CommandBarPopup<br>&nbsp;&nbsp;&nbsp; Static xRecure As Integer<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; xRecure = xRecure + 1<br>&nbsp;&nbsp;&nbsp; For Each xControlBar In FromControls<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set xAddControl = ToControls.Add(xControlBar.Type, xControlBar.Id, xControlBar.Caption)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xAddControl.BeginGroup = xControlBar.BeginGroup<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If xControlBar.Type = xtpControlButtonPopup Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set xControlPopup = xAddControl<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If xRecure = 1 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xAddControl.Style = xtpButtonCaption<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xAddControl.Style = xtpButtonIconAndCaption<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set xFromPopup = xControlBar<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CopyControls xFromPopup.CommandBar.Controls, xControlPopup.CommandBar.Controls<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; Next<br>&nbsp;&nbsp;&nbsp; xRecure = xRecure - 1<br>End Sub</div><div>&nbsp;</div><div>&nbsp;</div><div>Have a look and enjoy ;)</div><div>&nbsp;</div><div><img src="https://forum.codejock.com/uploads/20080710_095507_FTIS-Demo.png" border="0"></div><div>&nbsp;</div><div>I think, it's look very nice.</div><div>Use this code for free.</div>]]>
   </description>
   <pubDate>Thu, 10 Jul 2008 09:56:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11381&amp;PID=38137&amp;title=for-all-of-interests-howto-ribbon-from-designer#38137</guid>
  </item> 
 </channel>
</rss>