By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

Anyone have more than a surface understanding of DragDrop

P: n/a

The following is from the doc.
DragEventArgs.KeyState Property
-snip

' Set the effect based upon the KeyState.
If ((e.KeyState And (8 + 32)) = (8 + 32) And _
(e.AllowedEffect And DragDropEffects.Link) = DragDropEffects.Link)
Then
' KeyState 8 + 32 = CTL + ALT

' Link drag and drop effect.
e.Effect = DragDropEffects.Link
- snip

If I drag a Link from Word and check the value of e.AllowedEffect it is All.
But if you look at the bits of All, 4 is not set.
The value of DragDropEffects.Link is 4.
So the above will never be satisfied if e.AllowedEffect is All

1. I don't know how in DoDragDrop to say I handle all, including links.
DoDragDrop(DragDropEffects.All) will not later pass the test above.
I could use DoDragDrop(DragDropEffects.All or DragDropEffects.Link)
but there is still the problem of dragging from Word (and maybe to Word).

2. Word evidently does DoDragDrop(DragDropEffects.All) because, as I said,
if I drag a Link from Word and check the value of e.AllowedEffect it is All.
But that will not later pass the test in the documentation.

Something is amiss - probably my analysis.

I know this will take more study then most of my previous questions just to
understand the problem.
But I'm hoping someone either has already been through this or is a great
puzzle solver.



Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.