<?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 : Set Effect value in TreeView&#039;s OLEDragDrop</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : Set Effect value in TreeView&#039;s OLEDragDrop]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 07:58:37 +0000</pubDate>
  <lastBuildDate>Mon, 27 Jun 2011 03:51:40 +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=18533</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[Set Effect value in TreeView&#039;s OLEDragDrop : I modify your code as below:--...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18533&amp;PID=65019&amp;title=set-effect-value-in-treeviews-oledragdrop#65019</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6593">mjohn</a><br /><strong>Subject:</strong> 18533<br /><strong>Posted:</strong> 27 June 2011 at 3:51am<br /><br /><div>I modify your code as below:</div><div>-------------------------------------------------------------------------------------------------------</div><div>Option Explicit</div><div><br></div><div>Private Sub Form_Load()</div><div>&nbsp; &nbsp; tvwExplorer.OLEDragMode = xtpOLEDragAutomatic</div><div>&nbsp; &nbsp; tvwExplorer.OLEDropMode = xtpOLEDropManual</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; tvwExplorer.Nodes.Add , , "node1", "node1"</div><div>&nbsp; &nbsp; tvwExplorer.Nodes.Add , , "node2", "node2"</div><div>&nbsp; &nbsp; tvwExplorer.Nodes.Add , , "node3", "node3"</div><div>&nbsp; &nbsp; tvwExplorer.Nodes.Add , , "node4", "node4"</div><div>End Sub</div><div><br></div><div>Private Sub tvwExplorer_OLEStartDrag(Data As XtremeSuiteControls.DataObject, AllowedEffects As Long)</div><div>Dim oDragNode As TreeViewNode</div><div><br></div><div>&nbsp; &nbsp; If Not Me.tvwExplorer.SelectedItem Is Nothing Then</div><div>&nbsp;' check if valid ...</div><div>&nbsp; &nbsp; &nbsp; &nbsp; AllowedEffects = vbDropEffectMove</div><div>&nbsp; &nbsp; Else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; AllowedEffects = vbDropEffectNone</div><div>&nbsp; &nbsp; End If</div><div><br></div><div>End Sub</div><div><br></div><div>Private Sub tvwExplorer_OLEDragDrop(ByVal Data As XtremeSuiteControls.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)</div><div>&nbsp; &nbsp; ' do what u need</div><div>&nbsp; &nbsp; ' nothing about Effect</div><div>&nbsp; &nbsp; If MsgBox("Select yes to set Effect = vbDropEffectMove, Select no to set Effect = vbDropEffectCopy ", vbYesNo, "Yes") = vbYes Then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Effect = vbDropEffectMove</div><div>&nbsp; &nbsp; Else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Effect = vbDropEffectCopy</div><div>&nbsp; &nbsp; End If</div><div>End Sub</div><div><br></div><div>Private Sub tvwExplorer_OLECompleteDrag(Effect As Long)</div><div>&nbsp; &nbsp; MsgBox "result:" &amp; IIf(Effect = vbDropEffectMove, "vbDropEffectMove", "vbDropEffectCopy"), vbOKOnly</div><div>End Sub</div><div><br></div><div>--------------------------------------------------------------------------------------------------------</div><div><br></div><div>&nbsp;Above code, &nbsp;in&nbsp;tvwExplorer_OLEDragDrop event, whether set &nbsp;Effect = vbDropEffectMove or set&nbsp;Effect =&nbsp;vbDropEffectCopy</div><div>in&nbsp;tvwExplorer_OLECompleteDrag event, &nbsp;Effect &nbsp;always is&nbsp;vbDropEffectMove ,&nbsp;</div><div>this is not right, &nbsp;it should be the same as the value in&nbsp;tvwExplorer_OLEDragDrop .</div><div><br></div><div>Thanks!</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 27 Jun 2011 03:51:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18533&amp;PID=65019&amp;title=set-effect-value-in-treeviews-oledragdrop#65019</guid>
  </item> 
  <item>
   <title><![CDATA[Set Effect value in TreeView&#039;s OLEDragDrop : I use code like this one. It&amp;#039;s...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18533&amp;PID=64992&amp;title=set-effect-value-in-treeviews-oledragdrop#64992</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 18533<br /><strong>Posted:</strong> 23 June 2011 at 10:59am<br /><br />I use code like this one. It's working ok for me.<DIV></DIV><table width="99%"><tr><td><pre class="BBcode"><DIV>Private Sub Form_Load()<BR>&nbsp;&nbsp;&nbsp; tvwExplorer.OLEDragMode = xtpOLEDragAutomatic<BR>&nbsp;&nbsp;&nbsp; tvwExplorer.OLEDropMode = xtpOLEDropManual<BR>End Sub</DIV><DIV>Private Sub tvwExplorer_OLEStartDrag(Data As XtremeSuiteControls.DataObject, AllowedEffects As Long)<BR>Dim oDragNode As TreeViewNode</DIV><DIV>&nbsp;&nbsp;&nbsp; If Not Me.tvwExplorer.SelectedItem Is Nothing Then<BR>&nbsp;' check if valid ...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AllowedEffects = vbDropEffectMove<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AllowedEffects = vbDropEffectNone<BR>&nbsp;&nbsp;&nbsp; End If</DIV><DIV>End Sub</DIV><DIV><BR>Private Sub tvwExplorer_OLEDragOver(ByVal Data As XtremeSuiteControls.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single, ByVal state As Integer)<BR>&nbsp;&nbsp;&nbsp; ' do what u need</DIV><DIV>&nbsp;&nbsp;&nbsp; If Not okDrop Or state = vbLeave Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set tvwExplorer.DropHighlight = Nothing<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Effect = vbDropEffectNone<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set tvwExplorer.DropHighlight = tvwExplorer.HitTest(x, Y)<BR>&nbsp;&nbsp;&nbsp; End If<BR>End Sub</DIV><DIV>&nbsp;</DIV><DIV>Private Sub tvwExplorer_OLEDragDrop(ByVal Data As XtremeSuiteControls.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)<BR>&nbsp;&nbsp;&nbsp; ' do what u need<BR>&nbsp;&nbsp;&nbsp; ' nothing about Effect</DIV><DIV>End Sub</DIV><DIV>&nbsp;</DIV><DIV>Private Sub tvwExplorer_OLECompleteDrag(Effect As Long)<BR>&nbsp;&nbsp;&nbsp; Effect = vbDropEffectNone<BR>End Sub<BR></pre></td></tr></table></DIV>]]>
   </description>
   <pubDate>Thu, 23 Jun 2011 10:59:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18533&amp;PID=64992&amp;title=set-effect-value-in-treeviews-oledragdrop#64992</guid>
  </item> 
  <item>
   <title><![CDATA[Set Effect value in TreeView&#039;s OLEDragDrop : Hi.InTreeView&amp;#039;s TreeView&amp;#039;s...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18533&amp;PID=64860&amp;title=set-effect-value-in-treeviews-oledragdrop#64860</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6593">mjohn</a><br /><strong>Subject:</strong> 18533<br /><strong>Posted:</strong> 10 June 2011 at 12:44pm<br /><br /><div><div>Hi.</div><div><br></div><div>In&nbsp;TreeView's &nbsp;TreeView's OLEDragDrop event</div></div><div>whether &nbsp;set &nbsp;Effect = vbDropEffectMove &nbsp;or&nbsp;Effect = vbDropEffectMove, &nbsp;</div><div><br></div><div>in the Source's OLECompleteDrag event</div><div>Effect will get the same value, &nbsp;the set value to&nbsp;Effect in&nbsp;TreeView's OLEDragDrop event&nbsp;is invalid.</div><div><br></div><div>Thanks!</div><div><br></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">V15.0.1</span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">VB6 SP6</span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">Win7</span></div><div><br></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Fri, 10 Jun 2011 12:44:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18533&amp;PID=64860&amp;title=set-effect-value-in-treeviews-oledragdrop#64860</guid>
  </item> 
 </channel>
</rss>