The UnitOOPS OLE Drag and Drop Components: TUOTextSource, TUOTextTarget, TUOGraphicSource, TUOGraphicTarget.
Purchase the registered version through Kagi, using your credit card.
Prices per developer: US$25 (no source); US$75 (with source)
Site license (unlimited developers at a single location): US$300 (with source)

These components provide the Delphi developer with access to most common inter-application (OLE) drag and drop capabilities with almost no coding. And, there are events you can handle to get even more control over the drag and drop process. You can drag text and pictures (bitmaps or metafiles) to other applications. You can accept plain text, file lists, rich text (RTF), Microsoft HTML format, URL links, bitmaps, DIBs and metafiles, all neatly encapsulated in Delphi-style objects (e.g., graphical content is always in a TPicture). Here's how simple the process is:

Drop source example: Drop a TUOTextSource and a TListView on your form. Set the DragMode property of TListView to dmAutomatic, and connect the TUOTextSource's DonorComponent property to the TListView. Finally, in the OnStartDrag event of the TListView, enter the code "UOTextSource1.Execute; abort;"
That's it! The TListView is now a fully functioning OLE drag source, and the text supplied to a drop target like Excel or Word will be the text of the currently selected item and its SubItems, separated by tabs (drop onto Excel to see the effect)! If the TListView were multi-select, all of the selections would be dropped. In general, TUOTextSource tries to do "the right thing" with the DonorComponent; if you prefer, of course, you can still set the text to be dropped explicitly yourself. The DonorComponent can be any TComponent descendant.
Drop target example: Drop a TUOTextTarget and a TMemo on your form. On the TUOTextTarget, connect the AcceptorControl property to the TMemo and set the AcceptTextFormat property to [dtfText, dtfFiles]. Finally, in the OnDrop event of the TUOTextTarget, write the code that does what you want with the dropped text, e.g., "Memo1.Lines.Add(dropText);"
That's it! The TMemo can now accept drops of text from Excel or Word, or lists of files from Explorer!
You can browse the code for other sample applications here to see how straightforward it is to incorporate OLE drag and drop into your own applications, without first having to download and experiment with the components.
Full context-sensitive help is provided.


Contact information:

UnitOOPS Software
132 Cherry Hill Road
Orange, CT 06477-1702
USA

E-mail: unitoops@pobox.com
Phone: +1 (203) 891-8333

Last modified: Monday, August 24, 1998 10:07:09 PM