views:

1430

answers:

3

I would like to create a Delphi application for Windows XP which allows dropping of files dragged from Windows Explorer (the Desktop or folder windows) or other applications which support this operation (such as Total Commander). What about vice-versa? When the user drags an icon from my application, I should be able to set the contents of the dragged object to custom data.

My goal is to create a custom application toolbar, onto which I can drop applications and show their icons or drag applications or other entities from it.

How can this be done?

+6  A: 

This can be done with The Drag and Drop Component Suite. It also has examples for what you want.

Lars Truijens
The URL isn't working right now. Could have been stackoverflowed ( http://en.wikipedia.org/wiki/Slashdot_effect ), I'll try again a bit later because it sure sounds interesting!
Tom
It's a very slow server, AFAICT. Probably just ADSL upstream rate.The Drag and Drop suite is very good, but NOT YET ported for Delphi 2009.
Roddy
+1  A: 

Raymond Chen has a nice series of articles about drag&drop:

There are many other good articles on his blog when you search for drag and drop.

Otherside
+1  A: 

DropMaster from Raize Components

DropMaster is a set of 4 native VCL controls for use in Delphi and C++Builder. While the VCL components included with Delphi and C++Builder permit drag and drop between windows in the same application, DropMaster allows developers to add support for drag and drop between applications. The drag and drop can be between the developer's new application and existing applications such as the Microsoft Office suite, a web browser, etc., or between two custom-written applications.

DropMaster's functionality is divided according to whether you want to allow the user to drag from his application to elsewhere, i.e., a drag source, or from elsewhere to his application, i.e., a drop target. In addition to the actual drag and drop functionality, the components expose several events that allow the developer to get feedback on the drag and drop process while it is happening, or to modify it.

Gerard