For Programmers: Free Programming Magazines  


Home > Archive > C# > June 2006 > Drag Drop files









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Drag Drop files
banduraj

2006-06-26, 8:02 am

I'm trying to write an app that will allow a user to drag/drop and
copy/paste files between the app interface and windows explorer.
However I need to process those files before they are copied or moved.
This would happen in both directions. Copying a file or moving a file
into the app is no problem, however, going from the app back to
explorer is the problem.

I need to get the location of where the files were dragged or pasted
too so that I can process them before they are actually copied or moved
to that location. Is there any callback or way of getting the path to
the location the files will be placed after a drop or paste to anywhere
in windows explorer?

banduraj

2006-06-27, 7:02 pm

I think I found a way around doing this by using the
FILEGROUPDISCRIPTOR data format when pasting the data. However, there
really is not much definition around this in C#. It looks like it is
not implimented in managed code, and I have no problems doing it in
unmanaged code, I just need some examples.

If anyone can help show me how I would go about using
FILEGROUPDISCRIPTOR and FILECONTANTS to put data on a DataObject it
would be much appreaicated.

banduraj wrote:
> I'm trying to write an app that will allow a user to drag/drop and
> copy/paste files between the app interface and windows explorer.
> However I need to process those files before they are copied or moved.
> This would happen in both directions. Copying a file or moving a file
> into the app is no problem, however, going from the app back to
> explorer is the problem.
>
> I need to get the location of where the files were dragged or pasted
> too so that I can process them before they are actually copied or moved
> to that location. Is there any callback or way of getting the path to
> the location the files will be placed after a drop or paste to anywhere
> in windows explorer?


banduraj

2006-06-27, 7:02 pm

I think I found a way around doing this by using the
FILEGROUPDISCRIPTOR data format when pasting the data. However, there
really is not much definition around this in C#. It looks like it is
not implimented in managed code, and I have no problems doing it in
unmanaged code, I just need some examples.

If anyone can help show me how I would go about using
FILEGROUPDISCRIPTOR and FILECONTANTS to put data on a DataObject it
would be much appreaicated.

banduraj wrote:
> I'm trying to write an app that will allow a user to drag/drop and
> copy/paste files between the app interface and windows explorer.
> However I need to process those files before they are copied or moved.
> This would happen in both directions. Copying a file or moving a file
> into the app is no problem, however, going from the app back to
> explorer is the problem.
>
> I need to get the location of where the files were dragged or pasted
> too so that I can process them before they are actually copied or moved
> to that location. Is there any callback or way of getting the path to
> the location the files will be placed after a drop or paste to anywhere
> in windows explorer?


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com