471,336 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

DragDrop files


We have a directory receiving PDF files from various scanners. I need a
simple to browse these files, view them, and based on the content move them
to different applications using drag/drop.

I've written a very simple Windows app with a list view on the left side and
a WebBrowser control on the right side. In the list view I show all PDF
files from the directory. When the user click on a file in the list view I
show the PDF file in the WebBrowser control. (The WebBrowser control will
use which ever pdf reader installed to show the file)

I want to drag the "file" from my list view to another application. (e.g
Explorer). When the file has been moved it should be deleted from the
directory and removed from my list view, and the next file from the list
should be shown in the WebBrowser control. Sounds easy - but:

If I use DragDropEffects.Move in the listView.DoDragDrop the receiving
application (e.g Explorer) will fail because the file is in use by the
WebBrowser control. (Where the pdf file is shown). I've tried to navigate to
the next file but it seems impossible to syncronize this to happen before
the file move when the file is dropped.

If I use DragDropEffects.Copy in the listView.DoDragDrop I'll have to
manually delete the file and remove it from my listview. I've tried deleting
the file in the listviews QueryContinueDrag event which is fired when the
file is dropped in another application, this is fired as soon as the file is
dropped so I got the file deleted before the receiving app got it copied.

Seems like it is very difficult to syncronize when a file is droppep to a
"foreign" application.

Any suggestion would be appreciated thanks.

Jun 27 '08 #1
0 1139

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Kate | last post: by
4 posts views Thread by Owe Armandt | last post: by
reply views Thread by Mark C. | last post: by
3 posts views Thread by Roger Uribe | last post: by
reply views Thread by Gene Hubert | last post: by
3 posts views Thread by Gary Dunne | last post: by
1 post views Thread by Jeff Williams | last post: by
10 posts views Thread by Ratnesh Raval | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.