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 Transfer@Once to build applications that transfer data both ways is now as easy as put a component on a form. The aim of the Transfer@Once component suite 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 ready-to-use format classes, as well as customizable ones.
    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 URL transfer), 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 URL transfer), Internet shortcuts (native to Windows Explorer and Desktop), and Text/Unicode Text (supported by everything, isn't it?)
  • During inter-application drag-and-drop operations managed by OLE, the controller works with standard properties and events the same way as during internal drag-and-drop ones managed by the VCL. Since the controller is aware of drag-and-drop events, it can handle them behind the scenes, so you can even know nothing about implementation of drag-and-drop in the VCL. Of course, if you need full control, the standard 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, the controller tests pick conditions to determine whether to allow the user pick up selected data and begin dragging. It indicates that a drag operation can be started by changing cursor image. 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. The clipboard can leave data on the clipboard after the application is closed and 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.

TtaoWinControlTtaoWinControl is a general-purpose customizable controller designed to work with any visual control. Only a single component is needed to allow a visual control to support the clipboard as well as drag-and-drop.

TtaoStringGridTtaoStringGrid allows TStringGrid to support clipboard and drag-and-drop data transfer. A single string as well as a tabular range of strings can be supplied as RTF and Text and accepted as Text.

TtaoDbGridTtaoDbGrid makes TDBGrid to be able to copy and paste records as well as a single cell in many popular clipboard formats, including ones native to MS Office. It supports drag-and-drop of a single cell also. If the TtaoDbGrid component is unable to paste one or more records, it stores them in an in-memory dataset, so the user is able to fix the problems that resulted in the paste errors.

TtaoDbGrid introduces a number of features to improve user interface provided by TDBGrid.

  • The user can select a single cell (with a mouse click), a range of records (with Shift+Click), multiple records (with Ctrl+Click) in the same mode.
  • Vertical scrolling is more intuitive. Records are scrolled line-by-line when the user clicks a scroll arrow on the vertical scroll bar. The indicator stays on the same row when the user scrolls records page-by-page with scroll bar. Scroll thumb tracking with sequenced datasets.
  • Using a mouse equipped with a wheel, the user can scroll records line-by-line or, when holding down the Ctrl key, page-by-page.

TtaoOleObjectTtaoOleObject transfers OLE objects to other applications.


TtaoDragCursorsTtaoDragCursors replaces images for the cursors predefined in the VCL with ones used by OLE, so that they look like common Windows GUI cursors during drag-and-drop operations.
CursorOldNew
crNoDrag
crDrag
crMultiDrag       
New cursor resources are not stored in the executable file, but rather loaded from OLE32.DLL, which is part of Windows, dynamically at runtime. So there is no copyright violation.

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

The latest release of Transfer@Once is version 1.7. Transfer@Once supports Delphi 4, 5, 6, 7, 2005 Win32, 2006 Win32, and C++Builder 4, 5, 6, 2006. Documentation and demo applications are provided.

To download the evaluation version please go to the Download page.