No, it didn't H!
Perhaps I was not clear enough?
I'm trying to do something which looks impossible with the public .NET API,
yet Word and OpenOffice manage it.
In pseudo code it will look like that:
if(target == this)
AllowedEffect = Copy | Move;
else
AllowedEffect = Copy;
Of course the source should update the AllowedEffect every time the target
change. Which is not possible with the API, yet Word manage to do it.
So I wonder how it does it...
> The DragDropEffects enum is a Flags enum so when DoDrapDrop'ing at the
> source, if the data can be moved or copied then you set the effect to
[quoted text clipped - 31 lines]
>> (i.e.
>> wether it's me or not))
Jeff Gaines - 24 Nov 2006 15:18 GMT
On 24/11/2006 in message <##xYcz8DHHA.3520@TK2MSFTNGP04.phx.gbl> Lloyd
Dupont wrote:
>No, it didn't H!
>
>Perhaps I was not clear enough?
>I'm trying to do something which looks impossible with the public .NET
>API, yet Word and OpenOffice manage it.
I do that with a TreeView as follows:
private void tvFav_DragOver(object sender, DragEventArgs e)
{
// Control key moves
if (e.Data.GetDataPresent(typeof(JExLVItem)))
{
if ((e.KeyState & 8) == 8)
e.Effect = DragDropEffects.Move;
else
e.Effect = DragDropEffects.Copy;
}
else
e.Effect = DragDropEffects.None;
}
Can you trap DragOver in whatever control you are dropping on? You could
then test for the type of data.

Signature
Jeff Gaines
Dave Sexton - 26 Nov 2006 05:53 GMT
Hi Lloyd,
The key is that your drop targets must be aware of the source, not the other
way around.
You may want to read the following article:
"Performing Drag and Drop Operations"
http://msdn2.microsoft.com/en-gb/library/ms973845.aspx
(The article uses VB.NET; sorry :)

Signature
Dave Sexton
> No, it didn't H!
>
[quoted text clipped - 49 lines]
>>> (i.e.
>>> wether it's me or not))