<?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 : RibbonBar Systembutton</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : RibbonBar Systembutton]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 18:22:15 +0000</pubDate>
  <lastBuildDate>Sun, 28 Feb 2010 18:10:41 +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=16307</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[RibbonBar Systembutton : Thank you it works fine ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16307&amp;PID=57215&amp;title=ribbonbar-systembutton#57215</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1884">moe188</a><br /><strong>Subject:</strong> 16307<br /><strong>Posted:</strong> 28 February 2010 at 6:10pm<br /><br />Thank you it works fine <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0">]]>
   </description>
   <pubDate>Sun, 28 Feb 2010 18:10:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16307&amp;PID=57215&amp;title=ribbonbar-systembutton#57215</guid>
  </item> 
  <item>
   <title><![CDATA[RibbonBar Systembutton :   This turns out to be a bit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16307&amp;PID=57190&amp;title=ribbonbar-systembutton#57190</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 16307<br /><strong>Posted:</strong> 27 February 2010 at 9:14pm<br /><br />This turns out to be a bit trickier than you might expect for a couple of reasons:<br><br>1) Clicking the System Button doesn't fire the Execute event, so you can't test for it there.<br>2) You can test for the System Button in the InitCommandsPopup event, but if you call Unload Me in that event then the IDE (and likely compiled EXE) will crash.<br><br>Fortunately, you can safely use the PostMessage API with WM_CLOSE on the form hWnd to close the window in the InitCommandsPopup event. The following code works in my limited testing (assuming a form with a command bars control named CommandBars1):<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Private Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long<br>Private Const WM_CLOSE As Long = &amp;H10<br><br>Private mo_SysBtn As CommandBarControl ' Reference to the System Button control<br><br>Private Sub CommandBars1_InitCommandsPopup(ByVal CommandBar As XtremeCommandBars.ICommandBar)<br>&nbsp;&nbsp; If CommandBar Is mo_SysBtn.CommandBar Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' The system button is about to show its popup<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' This should mean that it was clicked.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PostMessage Me.hwnd, WM_CLOSE, 0, 0 ' Unload Me will crash the IDE! PostMessage is the safe way to close the app in the InitCommandsPopup<br>&nbsp;&nbsp; End If<br>End Sub<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp; With Me.CommandBars1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EnableOffice2007Frame True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .VisualTheme = xtpThemeRibbon<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .AddRibbonBar("Ribbon")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Create system button, and store a reference<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set mo_SysBtn = .AddSystemButton<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EnableFrameTheme<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<br>&nbsp;&nbsp; End With<br>End Sub<br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Sat, 27 Feb 2010 21:14:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16307&amp;PID=57190&amp;title=ribbonbar-systembutton#57190</guid>
  </item> 
  <item>
   <title><![CDATA[RibbonBar Systembutton : Hello,  I am adding a RibbonBar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16307&amp;PID=57189&amp;title=ribbonbar-systembutton#57189</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1884">moe188</a><br /><strong>Subject:</strong> 16307<br /><strong>Posted:</strong> 27 February 2010 at 4:32pm<br /><br />Hello, <DIV>I am adding a RibbonBar SystemButton to my form, but without any submenu, and I want the form to close once the user clicks the SystemButton. How can I do this?</DIV><DIV>Thank you</DIV>]]>
   </description>
   <pubDate>Sat, 27 Feb 2010 16:32:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16307&amp;PID=57189&amp;title=ribbonbar-systembutton#57189</guid>
  </item> 
 </channel>
</rss>