Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 23786, Transfer@Once

by Andrei Fomine Email: Anonymous

Full-blown clipboard and drag-and-drop transfer to/from any control in most general formats, including the ones native to MS Office.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 4.0  to 10.0 70 downloads
Copyright: All rights reserved

Size: 1,338,988 bytes
Updated on Tue, 22 Nov 2005 11:06:19 GMT
Originally uploaded on Sun, 30 Oct 2005 09:41:54 GMT
SHA1 Hash: 842C63002B094A9F50A3CDF19E9362A9B5CF1EDE
MD5 Hash: C4C0B29FFB94BA272FA8756C4E1CA236

    Explore the files in this upload

Most applications allow the user to transfer data to another application by dragging and dropping the data with the mouse, or by using the clipboard. With the Transfer@Once component suite to build applications that transfer data both ways is now as easy as put a component on a form. The aim of Transfer@Once is to extend VCL components with full-blown clipboard and drag-and-drop capabilities.

The core functionality is implemented in components called controllers. Place a controller on the form just as you place other nonvisual components and associate it with the visual control.

- The controller holds format objects to convert data during drag-and-drop and clipboard operations. There are some ready-to-use format classes, as well as format classes customizable at design-time.

Right now you can accept data as BIFF5 (supported by MS Access), BIFF8 (native to MS Excel), file names and Shell items (native to Windows Explorer, Desktop), virtual files (supported by MS Outlook, Outlook Express), hyperlinks (native to Internet Explorer/Outlook/Outlook Express, Mozilla/Firefox, and Netscape Navigator; Opera does not support the feature), Internet shortcuts (native to Windows Explorer and Desktop), and Text/Unicode Text (supported by everything).

You can supply data as RTF (native to MS Word and WordPad), BIFF8 (native to MS Excel), tabular text (supported by MS Access), file names, file shortcuts, virtual files, and Shell items (native to Windows Explorer, Desktop, supported by Delphi/C++Builder IDE), hyperlinks (native to Internet Explorer, Mozilla/Firefox, and Netscape Navigator; Opera does not support the feature), Internet shortcuts (native to Windows Explorer and Desktop), and Text/Unicode Text (supported by everything, isn't it?). OLE objects created using Automation can be moved to external applications.

- The inter-application drag-and-drop provided by OLE works with standard properties and events the same way as the internal drag-and-drop managed by the VCL does and thus works seamlessly. Since the controller is aware of drag-and-drop events, it can handle them implicitly, so you can even know nothing about implementation of drag-and-drop in the VCL. Of course, if you need manual control, usual properties and events are available as well.

- The controller monitors mouse movement to provide visual feedback to the user. If the mouse pointer have been hovering over the control for a given period of time, controller tests pick conditions to determine whether to allow the user pick up selected data and begin dragging. To indicate that a drag operation can be started, it sets cursor to another value. The controller can begin a drag operation automatically when the user presses the left mouse button. To avoid interference with normal mouse activity, it provides the OnBeforeLeftButtonDown event.

- When the mouse pointer is over an area that is a drop target, the controller provides visual feedback in the control, indicating where the drop is to occur.

- If the mouse pointer during a drag-and-drop operation is held near the border of the window for some time, the controller starts scrolling the window in the appropriate direction.
On the drop action, if the control was not active, the controller sets focus to the control's window.

- Some of clipboard formats are time-consuming to render, thus the controller delays rendering in the particular clipboard format until the data placed on the clipboard is really needed. To leave the data on the clipboard after the application is closed, the controller can flush the clipboard at application shutdown.

- In response to a Paste Special command the controller invokes the standard Paste Special dialog box, allowing the user to select the format of the clipboard object to be pasted.

- There are action classes for most common user commands. To use actions is the standard way in user interface development in the VCL.

Evaluation version of Transfer@Once has two limitations:
- Dummy cursors are used when dragging outside of the application.
- The Paste Special dialog is invoked in response to the Paste command.
Projects created with the evaluation version can be completed with the registered version at any time.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03