"Ratnesh Raval" <ra**********@g mail.comwrote in message
news:uv******** ******@TK2MSFTN GP02.phx.gbl...
>>>
Hi Lloyd,
The problems are,
For a drag from explorer to listview, i get the dataobjects -- which
are files.
For a drag within listview, i have to pass dataobjects -- which are
listviewitems . ( so you can drop them within another folder inside
listview)
For a drag from listview to explorer, i've to pass dataobjects -- which
are files (listviewitems but for explorer i've to pass them as files)
so basically, when dragging out from listview , I am not sure how to
detect, if somebody is going to drop them in listview itself or in the
explorer.
so i pass the items on listview to Dataobjects either as files or as
listviewitems .
I think i made it clear to understand.
Thanks
R
I am not sure why you would have to have two different situations.
Simply pick the way that works with the external program in this case
Explorer and then ensure that your application will respond in the same
manner. In my app the listview items do represent files and by creating
the dataobjects I can drag from Windows into my app and from my app into
windows.
If there is something I am missing please let me know I and I will see if
I can help.
Lloyd Sheen
my listview works as file explorer. so there are 3 situations
1. drag file from explorer -- drop in listview
2. drag file from listview ---drop in explorer.
3. drag file from listview ---drop inside the same listview but inside
some folder which is shown in the listview
if you look in your case, what if you want to move some file inside some
folder in listview itself ( not in the explorer),
if you want i will post it with codes.
R
I don't have the 3rd case in my app but it would be the same. Each
dataobject is representative of one file. Then when the drop happens each
dataobject will be a file and the app can do the appropriate thing. Perhaps
you are refering to moving a file. In that case you would get the result of
the drag / drop (not in my code) and then if a copy occurred do (most likely
nothing) , a move would delete the file in the source etc.
If you use the code and drag a file from the explorer and then return a
"Move" result you should see the file disappear from folder in explorer.
You can do the same thing in your app.
Lloyd