<?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 : CreateCommandBarControl And Click</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CreateCommandBarControl And Click]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 20:09:56 +0000</pubDate>
  <lastBuildDate>Wed, 27 Oct 2010 09:52:28 +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=17493</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[CreateCommandBarControl And Click :   Hello everyone,I&amp;#039;m trying...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17493&amp;PID=61184&amp;title=createcommandbarcontrol-and-click#61184</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6378">MottoDoki</a><br /><strong>Subject:</strong> 17493<br /><strong>Posted:</strong> 27 October 2010 at 9:52am<br /><br /><div><br></div><div>Hello everyone,</div><div><br></div><div>I'm trying to use a ControlMarkupLabel on my CommandBar and doing like RibbonSample App Sample (but no ribbon style <img src="http://forum.codejock.com/smileys/smiley9.gif" border="0" alt="Embarrassed" title="Embarrassed" />&nbsp;&nbsp;):</div><div>Dim ToolBarMenuFile As CommandBar</div><div>Dim ControlWS As CommandBarControl</div><div>Set ToolBarMenuFile = CommandBars.Add("TBMenu_File", xtpBarTop)</div><div>With ToolBarMenuFile</div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Set ControlWS = CommandBars.CreateCommandBarControl("CXTPControlMarkupLabel")</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.Id = ID_CMDBAR_MDIMAIN_WS</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.Caption = "&lt;TextBlock TextAlignment='Center'&gt;&lt;Image Margin='0, 0, 0, 0' Cursor='Hand' Source='file://mypicture.ico'/&gt;&lt;/TextBlock&gt;"</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.BeginGroup = True</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.Enabled = True</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.Controls.AddControl ControlWS</div></div><div>End With</div><div><br></div><div>In that case&nbsp;CommandBars_Execute event never fire.</div><div><br></div><div>So i tried something else like that, using external &nbsp;MarkupLabel and custom control:</div><div><div>Dim ToolBarMenuFile As CommandBar</div><div>Dim ControlWS As CommandBarControl</div></div><div>Set ToolBarMenuFile = CommandBars.Add("TBMenu_File", xtpBarTop)</div><div>With ToolBarMenuFile</div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mklWS.Caption = "&lt;TextBlock TextAlignment='Center'&gt;&lt;Image Margin='0, 0, 0, 0' Cursor='Hand' Source='file://mypicture.ico'/&gt;&lt;/TextBlock&gt;"</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Set ControlWS = CommandBars.CreateCommandBarControl("CXTPControlCustom")</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.Style = xtpButtonIcon</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.BeginGroup = True</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.Id = ID_CMDBAR_MDIMAIN_WS</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.Flags = xtpFlagControlStretched</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ControlWS.Handle = mklWS.hWnd</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.Controls.AddControl ControlWS</div></div><div>EndWith</div><div><br></div><div>In this case&nbsp;CommandBars_Execute event fire after 2 click and the first click make the icon to disappear&nbsp;<img src="http://forum.codejock.com/smileys/smiley11.gif" border="0" alt="Dead" title="Dead" /></div><div><br></div><div>So if anyone have any idea i will really appreciate thank you</div><div><br></div><div>Using CJ 13.4.1 Under XP sp3 And VB6 sp6 Icon Size are 32*32</div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 27 Oct 2010 09:52:28 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17493&amp;PID=61184&amp;title=createcommandbarcontrol-and-click#61184</guid>
  </item> 
 </channel>
</rss>