Drag and Drop - Better Explaination

M

MSNews

Appologies for reposting this, But I needed to get some attention to a
better worded question so here it is !

I have a problem with drag and drop. I am trying to drag something from
file explorer in windows XP to a listbox. The mechanism works and I use the
DragDrop event of the listbox to add the filenames to the list. This works
ok

However, The dragdrop effect is 'Move' as I have determined this. and I need
to inform the source that the paste has succeeded in order for it to update
the source file ( IE delete it ), because as it stands it will not delete
it.

Does anyone have any experience with this, offer a solution ?

OHM
 
C

CJ Taylor

OHM,

Couldn't you fire another event when the DragAction is set to Drop?
Therefore deleting the file that you are copying over?

Also, what is the Sender/Source object in your DragDrop event? does it give
you any info?

Just trying to help,
CJ
 
M

MSNews

Hi CJ,
The Sender is just the list box. There is some documentation
on the MS Site which refers to "Paste Succeeded" and "Performed DropEffect"
Constants. I have tried setting the e.Data.SetData methods to these
constants in various orders etc but to no avail.

Of course we could do the delete of the files manually after checking that
the files have arrive at their destination, but really the clipboard should
be able to manage its own end of the contract when you tell it you were
successfull with the drop. In this case it is a Move not a copy and so it
should delete the source file as I understand it. There is not much out on
the net about this so I suspect that this is not exposed properly to VB and
C#, either that or I have completely misunderstood something which is of
course possible !

Thanks for your reply

OHM
 
O

One Handed Man \( OHM#\)

Fraid not old bean,

Havent been able to make it work. Re-Read my post and you will see what Im
trying to do


Regards - OHM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top