SftDirectory 2.5

SftDirectory.OLEDrag Method

Softel vdm, Inc.

Initiates an OLE drag & drop operation.

Syntax       

VB.NET

object.OLEDrag(ByVal UseFolderData As Boolean, ByVal UseDragPicture As Boolean, ByVal xOffset As Single, ByVal yOffset As Single)

VB

object.OLEDrag(ByVal UseFolderData As Boolean, ByVal UseDragPicture As Boolean, ByVal xOffset As Single, ByVal yOffset As Single)

C#.NET

void object.OLEDrag(bool UseFolderData, bool UseDragPicture, float xOffset, float yOffset);

VC++

HRESULT object->OLEDrag(VARIANT_BOOL UseFolderData, VARIANT_BOOL UseDragPicture, float xOffset, float yOffset);

C

HRESULT object->raw_OLEDrag(VARIANT_BOOL UseFolderData, VARIANT_BOOL UseDragPicture, float xOffset, float yOffset);

Delphi

procedure object.OLEDrag(UseFolderData : WordBool, UseDragPicture : WordBool, xOffset : Single, yOffset : Single);

object

A SftDirectory object.

UseFolderData

Defines whether folders are about to be dragged.  Set to True to drag the selected folders using the Windows Shell drag & drop mechanisms.  Set to False to allow an application to drag application specific data provided using the DataObject object methods and properties. 

UseDragPicture

Defines whether a semi-transparent image of the folders is used to represent the data being dragged.  Set to True to use a semi-transparent image or set to False to use an application provided cursor.

xOffset

If a semi-transparent image is used (see UseDragPicture), xOffset defines the offset of the image's hotspot relative to the top, left corner of the image.  This should be set to -1 to allow the control to determine the best offset.  The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

yOffset

If a semi-transparent image is used (see UseDragPicture), yOffset defines the offset of the image's hotspot relative to the top, left corner of the image.  This should be set to -1 to allow the control to determine the best offset.  The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

Comments

The OLEDrag method initiates an OLE drag & drop operation.

OLE Drag & Drop is not supported with combo box style controls (see ControlStyle property).

An application can invoke an OLE drag & drop operation explicitly using the OLEDrag method.

When the OLEDrag method is called, the OLEStartDrag event occurs, allowing the application to supply data to a target component.

If the OLEDragMode property is set to OLEDragSftControlAutomatic, the OLEDrag method is automatically invoked when an OLE drag & drop operation is started by the user.

The OLEDragPix method can be used to provide xOffset and yOffset coordinates in pixels.


Feedback / comments / error reports for this topic
© 2003, 2008 - Softel vdm, Inc. - www.softelvdm.com