473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

DragDrop files

Hi

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.

Peter
Jun 27 '08 #1
0 1210

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Kate | last post by:
Hi: I have a form with a picture box and some command buttons to make certain shapes appear in the picture box. The shapes are drawn on blank UserControls added like this: 'at top of form...
4
by: Owe Armandt | last post by:
When I play with DragDrop of files to a form I get two DragEnter events before the DragDrop event, why is this?? Owe
0
by: Flack | last post by:
Hello, Is it possible to find out how many methods are listening to a certain event? For example, if a number of methods subscribed to a controls DragDrop event using +=, can I find out how many...
0
by: Mark C. | last post by:
I'm trying to program drag drop in a rich text box that is similiar to what you would see in wordpad, Word, etc. specifically, I'd like to move/copy text using drag drop. I can't seem to get the...
3
by: Roger Uribe | last post by:
It was easy in VB6... how can i retrieve the name(s) of files dropped onto a vb.net control from windows explorer it'll be easy in vb.net too ... when i know the answer!! thanks roger
0
by: Gene Hubert | last post by:
Well, it seems fundamental to me anyway. Hopefully it is simple enough. The question is for when the source for the dragdrop is a different application that the target for the dragdrop. How...
3
by: Gary Dunne | last post by:
I'm writing an app that requires drag and drop operation between a ListView and a TreeView control. (The source is the ListView). During the drag drop operation I want to be able to detect the...
3
by: Dpage | last post by:
Hello, I'm trying to allow users to drag a file (in this case a crystal report .rpt file) onto my application's icon and have that drop event open my application and open the report in the...
1
by: Jeff Williams | last post by:
With a DragDrop event is there a way to determine which control I have droped files onto. ie I have 5 picture boxes on the form. I want to use one dragdrop event and when the drop occurs get...
10
by: Ratnesh Raval | last post by:
Hi All, My question is on DragDrop, How would I implement a Drag from listview and Drop on Desktop or any other folder on the computer. The listview contains list of files, so basically...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.