SetFormat Method

Places a data format in the OLE DataObject object. Available at run time only.

You can call the SetFormat method in the OLEStartDrag and OLESetData events.

oDataObject.SetFormat(nFormat | cFormat)

Parameters

nFormat| cFormat

Specifies the format of the data placed on the DataObject object. You can also create your own format by specifying a unique character string for cFormat.

The following table lists values for some common data formats with a description of each format.

Data format* nFormat| cFormat Description

CF_TEXT

1

Text format.

CF_OEMTEXT

7

Text format containing characters in the OEM character set.

CF_UNICODETEXT

13

Unicode text format.

NoteNote

Available only for versions of Visual FoxPro running on Windows NT 4.0 or later.

CF_FILES or CF_HDROP

15

A handle that identifies a list of files, such as a set of files dragged from the Windows Explorer.

CFSTR_OLEVARIANTARRAY

"OLE Variant Array"

An array. Multiple values can be transferred in a single drag-and-drop operation with this format.

For example, this format can be used to drag a set of items in a list box to another list box.

CFSTR_OLEVARIANT

"OLE Variant"

A variant.

All data types in Visual FoxPro are represented as variants. This format can be used to drag and drop Visual FoxPro data without losing the data type.

CFSTR_VFPSOURCEOBJECT

"VFP Source Object"

A reference to the Visual FoxPro drag source object.

* Defined in FOXPRO.H.

Expand imageRemarks

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic