<?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 : [Solved] Markup Events Crash on Form Unload Me</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [Solved] Markup Events Crash on Form Unload Me]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 05:43:32 +0000</pubDate>
  <lastBuildDate>Wed, 30 Dec 2009 23:12:52 +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=15940</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[[Solved] Markup Events Crash on Form Unload Me : I had a support ticket open for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15940&amp;PID=55926&amp;title=solved-markup-events-crash-on-form-unload-me#55926</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 15940<br /><strong>Posted:</strong> 30 December 2009 at 11:12pm<br /><br />I had a support ticket open for a problem that I was having when using Markup events in the ReportControl. In my program, I wanted to unload the form hosting the reportcontrol when a markup image was clicked. Typically, this would be achieved simply by calling <b>Unload Me</b>.<i> </i>Unfortunately, this was crashing the IDE and generating an error report in the compiled EXE. Mark from Codejock suggested this workaround and it works well:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Const WM_CLOSE = &amp;H10<br><br>Private Declare FunctionPostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long,ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long<br><br>Public Sub XamlMouseDown(Reserved1 As Object, Reserved2 As Object)<br>&nbsp; ' Sample event raised from XAML in ReportControl<br><br>&nbsp; PostMessage Me.hwnd, WM_CLOSE, vbNull, vbNull&nbsp;&nbsp;&nbsp; ' Use this instead of Unload Me to prevent crash<br>End Sub<br></pre></td></tr></table><br><br>In case anyone else encounters the same problem, please use this workaround.<br><br>Happy New Year everyone!<br>]]>
   </description>
   <pubDate>Wed, 30 Dec 2009 23:12:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15940&amp;PID=55926&amp;title=solved-markup-events-crash-on-form-unload-me#55926</guid>
  </item> 
 </channel>
</rss>