<?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 : TaskDialog cancel button</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : TaskDialog cancel button]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 08:29:25 +0000</pubDate>
  <lastBuildDate>Thu, 19 Feb 2009 11:04:59 +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=13359</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[TaskDialog cancel button : Playing with the Vista TaskDialog...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45634&amp;title=taskdialog-cancel-button#45634</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4225">chrisABC</a><br /><strong>Subject:</strong> 13359<br /><strong>Posted:</strong> 19 February 2009 at 11:04am<br /><br />Playing with the Vista TaskDialog sample I find that<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you have a standard CANCEL button enabled,&nbsp; clicking CANCEL produces buttonclick event with ID = 8.<br><br>&nbsp; &nbsp; &nbsp; Pressing the ESC key produces buttonclick event with ID = 8<br><br>&nbsp; &nbsp;&nbsp; If I add my own Custom Button with caption = &amp;MyButton &nbsp; and ID = 11<br>&nbsp; &nbsp; &nbsp;&nbsp; then pressing&nbsp; ALT+M&nbsp; produces buttonclick event with ID = 11.<br><br>My guess is that the ESC keypress is hardwired to the inbuilt Cancel Button event.<br><br>With that in mind you can program around this if you need to (as you have done).<br>I wouldn't call it a bug -- just a feature of the TaskDialog.&nbsp; But it would have been useful if this was mentioned in the documentation.<br>&nbsp;<br>]]>
   </description>
   <pubDate>Thu, 19 Feb 2009 11:04:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45634&amp;title=taskdialog-cancel-button#45634</guid>
  </item> 
  <item>
   <title><![CDATA[TaskDialog cancel button : Hi Oleg, Any idea why the TaskDialog...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45433&amp;title=taskdialog-cancel-button#45433</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 13359<br /><strong>Posted:</strong> 13 February 2009 at 12:22pm<br /><br />Hi Oleg, <br><br>Any idea why the TaskDialog returns 8 when you click a custom button with an ID of 2?<br>]]>
   </description>
   <pubDate>Fri, 13 Feb 2009 12:22:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45433&amp;title=taskdialog-cancel-button#45433</guid>
  </item> 
  <item>
   <title><![CDATA[TaskDialog cancel button :  I&amp;#039;m using 12.1.1, and pressing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45200&amp;title=taskdialog-cancel-button#45200</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 13359<br /><strong>Posted:</strong> 08 February 2009 at 11:16pm<br /><br />I'm using 12.1.1, and pressing the ESC key doesn't click any button <b>unless</b> that button has a ID of 2. But the strange thing is, the ShowDialog and ButtonClick events return an ID of 8 for the clicked button (even if no button has an ID of 8). Can anyone else confirm this strange behaviour? I assume it is a bug.<br><br>This means you would have to have some unusual code to get the third button to be a cancel button:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp; With Me.TaskDialog1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Reset<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddButton "OK", 100<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddButton "Try Again", 101<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddButton "Cancel", 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If .ShowDialog = 8 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' 8?? Why does pressing the ESC key return 8 instead of 2?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "Cancelled"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "Not Cancelled"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp; End With<br></pre></td></tr></table><br><br><br>]]>
   </description>
   <pubDate>Sun, 08 Feb 2009 23:16:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45200&amp;title=taskdialog-cancel-button#45200</guid>
  </item> 
  <item>
   <title><![CDATA[TaskDialog cancel button : Hi friends. Is therea way to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45198&amp;title=taskdialog-cancel-button#45198</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2416">ElvisM</a><br /><strong>Subject:</strong> 13359<br /><strong>Posted:</strong> 08 February 2009 at 8:28pm<br /><br />Hi friends.<DIV>Is there&nbsp;a way to set the taskdialog's cancel button property?</DIV><DIV>&nbsp;</DIV><DIV>I mean, I can set the default button, but I can't set the cancel button.</DIV><DIV>&nbsp;</DIV><DIV>I have a task dialog with 3 buttons. If the user presses the Esc key, the second button fires. I need that when the user presses the Esc key, the third button fires, not second.</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>Elvis</DIV>]]>
   </description>
   <pubDate>Sun, 08 Feb 2009 20:28:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13359&amp;PID=45198&amp;title=taskdialog-cancel-button#45198</guid>
  </item> 
 </channel>
</rss>