<?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 : [WORKAROUND] OLE Drag &amp; Drop Insertion Point</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [WORKAROUND] OLE Drag &amp; Drop Insertion Point]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 08:27:39 +0000</pubDate>
  <lastBuildDate>Wed, 24 Jun 2009 13:28:26 +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=14606</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[[WORKAROUND] OLE Drag &amp; Drop Insertion Point : Here&amp;#039;s a workaround in lieu...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14606&amp;PID=50268&amp;title=workaround-ole-drag-drop-insertion-point#50268</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 14606<br /><strong>Posted:</strong> 24 June 2009 at 1:28pm<br /><br />Here's a workaround in lieu of any built-in method to find the insertion point (haven't discovered one yet):<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub ReportControl1_OLEDragDrop(ByVal Data As XtremeReportControl.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)<br>&nbsp;&nbsp; Dim lo_HitTest As ReportHitTestInfo<br>&nbsp;&nbsp; Dim lo_InsertBefore As ReportRecord<br>&nbsp;&nbsp; Dim lo_NewRec as ReportRecord<br>&nbsp;&nbsp; Dim l_Top As Long<br>&nbsp;&nbsp; Dim l_Left As Long<br>&nbsp;&nbsp; Dim l_Right As Long<br>&nbsp;&nbsp; Dim l_Bottom As Long<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Convert mouse coords to pixels &nbsp; <br>&nbsp;&nbsp; x = x \ Screen.TwipsPerPixelX<br>&nbsp;&nbsp; y = y \ Screen.TwipsPerPixelY<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Determine what row the mouse is hovering over<br>&nbsp;&nbsp; Set lo_HitTest = Me.ReportControl1.HitTest(x, y)<br>&nbsp;&nbsp; If Not lo_HitTest Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not lo_HitTest.Row Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lo_HitTest.Row.GetRect l_Left, l_Top, l_Right, l_Bottom<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If (y - l_Top) &lt; (l_Bottom - y) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Insertion point is before this row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lo_InsertBefore = lo_HitTest.Row.Record<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Insertion point is below this row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On Error Resume Next&nbsp;&nbsp;&nbsp; ' Trap error in case we are at the bottom row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lo_InsertBefore = Me.ReportControl1.Records(lo_HitTest.Row.Record.Index + 1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On Error GoTo 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp; If lo_InsertBefore Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Add new row to bottom of report<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lo_Rec = Me.ReportControl1.Records.Add<br>&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Insert new row above this record<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lo_Rec = Me.ReportControl1.Records.Insert(lo_InsertBefore.Index)<br>&nbsp;&nbsp; End If<br>End Sub<br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Wed, 24 Jun 2009 13:28:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14606&amp;PID=50268&amp;title=workaround-ole-drag-drop-insertion-point#50268</guid>
  </item> 
  <item>
   <title><![CDATA[[WORKAROUND] OLE Drag &amp; Drop Insertion Point :  When dragging &amp;amp; dropping...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14606&amp;PID=50247&amp;title=workaround-ole-drag-drop-insertion-point#50247</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 14606<br /><strong>Posted:</strong> 23 June 2009 at 9:56pm<br /><br />When dragging &amp; dropping files from Windows Explorer onto a ReportControl with OleDropMode = xtpOLEDropManual, a red line is drawn to illustrate the insertion point. Is there a built-in way to determine the reportrecord that the insert point is located at? I can perform a hit test, and then calculating against the halfway point vertically of the reportrecord if required, I just wanted to make sure I wasn't missing a built-in method.<br><br>Thanks in advance for any help.<br>]]>
   </description>
   <pubDate>Tue, 23 Jun 2009 21:56:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14606&amp;PID=50247&amp;title=workaround-ole-drag-drop-insertion-point#50247</guid>
  </item> 
 </channel>
</rss>