Drag Drop - Move Data Between Apps

M

Mike

I want to drag drop data from one app to another. If the other app
chooses to ‘move’ the data, I need to respond by deleting it from the
source app.

I was reading about the GiveFeedBack event.
See: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.givefeedback.aspx

It states “If the value of DragAction is Drop, the drop effect value
is returned to the source, so the source application can perform the
appropriate operation on the source data; for example, cut the data if
the operation was a move.”

OK, that’s exactly what I want to do but what event is fired to tell
me the drop effect? Unfortunately, the documentation doesn’t say. I
don’t see any event getting fired including the DragDrop event.

Any ideas?

Thanks,
Mike
 
G

G Himangi

The Control.DoDragDrop method return value will indicate the action that the
atregt took.

---------
- G Himangi, LogicNP Software http://www.ssware.com
Shell MegaPack: Drop-In GUI Controls For Windows Explorer Like File And
Folder Browser Functionality
CryptoLicensing: Add licensing, copy-protection and activation to your
software
EZNamespaceExtensions: Fast and painless development of namespace extensions
EZShellExtensions: Rapid development of all shell extensions,explorer bars
and BHOs
---------


I want to drag drop data from one app to another. If the other app
chooses to ‘move’ the data, I need to respond by deleting it from the
source app.

I was reading about the GiveFeedBack event.
See:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.givefeedback.aspx

It states “If the value of DragAction is Drop, the drop effect value
is returned to the source, so the source application can perform the
appropriate operation on the source data; for example, cut the data if
the operation was a move.”

OK, that’s exactly what I want to do but what event is fired to tell
me the drop effect? Unfortunately, the documentation doesn’t say. I
don’t see any event getting fired including the DragDrop event.

Any ideas?

Thanks,
Mike
 
R

RayLopez99

I want to drag drop data from one app to another. If the other app
chooses to ‘move’ the data, I need to respond by deleting it from the
source app.

Good luck with that. I once looked into D&D, and while there's a lot
of free code out there, there's always something going wrong when you
try and implement it. And I notice many programs today have gotten
away from using D&D, which was popular about 5 to 10 years ago. I
would just stick a menu item and be done with it. To me, D&D is not
that intuitive, as to what exactly it's supposed to do (when you drop
another program onto it). It's a gimmick IMO.

RL
 
M

Mike

Thanks G! That was it. I was misunderstanding the DoDragDrop. I
thought it immediately returned and everything was done with events
after that.
 

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