<?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 : How to detect Mouse-Events for Markup-Control?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : How to detect Mouse-Events for Markup-Control?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 12:18:38 +0000</pubDate>
  <lastBuildDate>Fri, 12 Dec 2008 13:51: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=12861</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[How to detect Mouse-Events for Markup-Control? : Glad to help...hacky, but it seems...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43616&amp;title=how-to-detect-mouseevents-for-markupcontrol#43616</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12861<br /><strong>Posted:</strong> 12 December 2008 at 1:51pm<br /><br />Glad to help...hacky, but it seems to work ;)]]>
   </description>
   <pubDate>Fri, 12 Dec 2008 13:51:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43616&amp;title=how-to-detect-mouseevents-for-markupcontrol#43616</guid>
  </item> 
  <item>
   <title><![CDATA[How to detect Mouse-Events for Markup-Control? : Realy not bad! ;-)Thank you!!! ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43603&amp;title=how-to-detect-mouseevents-for-markupcontrol#43603</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1570">Jebo</a><br /><strong>Subject:</strong> 12861<br /><strong>Posted:</strong> 12 December 2008 at 8:25am<br /><br />Realy not bad! ;-)<br><br>Thank you!!!<br>]]>
   </description>
   <pubDate>Fri, 12 Dec 2008 08:25:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43603&amp;title=how-to-detect-mouseevents-for-markupcontrol#43603</guid>
  </item> 
  <item>
   <title><![CDATA[How to detect Mouse-Events for Markup-Control? : This trick seems to work:1) Create...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43589&amp;title=how-to-detect-mouseevents-for-markupcontrol#43589</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12861<br /><strong>Posted:</strong> 11 December 2008 at 8:18pm<br /><br />This trick seems to work:<br><br>1) Create a dummy Border object that will be the Height &amp; Width of the MarkupLabel and give it the background colour of the underlying container.<br>2) Associate the Mouse events with the Border<br>3) Add the rest of your markup into a Container type element (e.g. StackPanel) and then set that to the Child property of the Border.<br><br>Here's an example:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Public Sub MarkupLabelEnter(ByVal Sender As MarkupObject, ByVal Args As MarkupRoutedEventArgs)<br>&nbsp;&nbsp; Debug.Print "Enter" &amp; Rnd<br>End Sub<br>Public Sub MarkupLabelLeave(ByVal Sender As MarkupObject, ByVal Args As MarkupRoutedEventArgs)<br>&nbsp;&nbsp;&nbsp; Debug.Print "Leave" &amp; Rnd<br>End Sub<br><br>Public Sub MarkupLabelMouseMove(ByVal Sender As MarkupObject, ByVal Args As MarkupRoutedEventArgs)<br>&nbsp;&nbsp;&nbsp; Debug.Print "Move" &amp; Rnd<br>End Sub<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp; Dim lo_Context As MarkupContext<br>&nbsp;&nbsp; Set lo_Context = MarkupLabel1.MarkupContext<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Dim lo_Border As MarkupBorder<br>&nbsp;&nbsp; Dim lo_Container As MarkupStackPanel<br>&nbsp;&nbsp; Dim lo_Text1 As MarkupTextBlock<br>&nbsp;&nbsp; Dim lo_Text2 As MarkupTextBlock<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set lo_Border = lo_Context.Parse("&lt;Border Width='Auto' Height='Auto'&gt;&lt;/Border&gt;")<br>&nbsp;&nbsp; With lo_Border<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddHandler .MouseEnterEvent, "MarkupLabelEnter"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddHandler .MouseLeaveEvent, "MarkupLabelLeave"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddHandler .MouseMoveEvent, "MarkupLabelMouseMove"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Background = lo_Context.CreateSolidBrush(Me.MarkupLabel1.Parent.BackColor)<br>&nbsp;&nbsp; End With<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set lo_Container = lo_Context.CreateObject("StackPanel")<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set lo_Text1 = lo_Context.CreateObject("TextBlock")<br>&nbsp;&nbsp; With lo_Text1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Background = lo_Context.CreateSolidBrush(vbWhite)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Text = "Object above mouse event lo_Border object shouldn't block events."<br>&nbsp;&nbsp; End With<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set lo_Text2 = lo_Context.CreateObject("TextBlock")<br>&nbsp;&nbsp; With lo_Text2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Background = lo_Context.CreateSolidBrush(vbGreen)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Text = "Another Object above mouse event lo_Border object shouldn't block events."<br>&nbsp;&nbsp; End With<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; lo_Container.Children.Add lo_Text1<br>&nbsp;&nbsp; lo_Container.Children.Add lo_Text2<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set lo_Border.Child = lo_Container<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set MarkupLabel1.MarkupUIElement = lo_Border<br>&nbsp;&nbsp; lo_Context.SetHandler Me<br>End Sub<br></pre></td></tr></table><br><br>What I don't know is if the MouseMoveEvent exposes the X &amp; Y coordinates of the mouse (and if so, I don't know how to retrieve that information). You might have to get the mouse position using the API and convert it to appropriate coordinates relative to your form &amp; MarkupLabel control.<br>]]>
   </description>
   <pubDate>Thu, 11 Dec 2008 20:18:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43589&amp;title=how-to-detect-mouseevents-for-markupcontrol#43589</guid>
  </item> 
  <item>
   <title><![CDATA[How to detect Mouse-Events for Markup-Control? : PLEASE can you help!?  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43580&amp;title=how-to-detect-mouseevents-for-markupcontrol#43580</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1570">Jebo</a><br /><strong>Subject:</strong> 12861<br /><strong>Posted:</strong> 11 December 2008 at 12:54pm<br /><br />PLEASE can you help!?]]>
   </description>
   <pubDate>Thu, 11 Dec 2008 12:54:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43580&amp;title=how-to-detect-mouseevents-for-markupcontrol#43580</guid>
  </item> 
  <item>
   <title><![CDATA[How to detect Mouse-Events for Markup-Control? : Hi,how can I detect if the user...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43449&amp;title=how-to-detect-mouseevents-for-markupcontrol#43449</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1570">Jebo</a><br /><strong>Subject:</strong> 12861<br /><strong>Posted:</strong> 05 December 2008 at 4:59am<br /><br />Hi,<br><br>how can I detect if the user holds the mouse down or makes mousemoves on a markup-control?<br><br>Is there a way?<br>]]>
   </description>
   <pubDate>Fri, 05 Dec 2008 04:59:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12861&amp;PID=43449&amp;title=how-to-detect-mouseevents-for-markupcontrol#43449</guid>
  </item> 
 </channel>
</rss>