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.