|
|
|
|
DnDIsDataAvailable (Function) In french: DnDDonnéeDisponible Checks whether a specific type of data is available during Drag/Drop.
// Only the "CF_TEXT" copy is allowed IF DnDIsDataAvailable(CF_TEXT) = True THEN ResRetrieve = DnDGetData(CF_TEXT) END
Syntax
<Result> = DnDIsDataAvailable(<Type of data>)
<Result>: Boolean - True if the specified type of data is available,
- False otherwise.
<Type of data>: Integer or character string Type of data copied/moved (corresponds to the type of data specified by DnDCacheData and DnDGetData).- Preset data types:
Only some types of data are presented below. For more details, see the Microsoft documentation ("Standard Clipboard Formats").
| | | CF_TEXT | 1 | ANSI string ending with a \0 character | CF_BITMAP | 2 | .BMP (bitmap image) | CF_METAFILEPICT | 3 | .WMF (graphic primitive file) | CF_SYLK | 4 | .SLK, Excel, Multiplan | CF_DIF | 5 | Data interchange format (lotus) | CF_TIFF | 6 | .TIF (TIFF image) | CF_OEMTEXT | 7 | OEM string ending with a \0 character | CF_DIB | 8 | .DIB (bitmap independent from the device managers) | CF_PALETTE | 9 | Palette (Windows standard) | CF_PENDATA | 10 | Optical pen | CF_RIFF | 11 | Audio format | CF_WAVE | 12 | .WAV (sound data) | CF_UNICODETEXT | 13 | Text string with characters coded on 2 bytes (support for internationalization) | CF_ENHMETAFILE | 14 | .EMF (Windows 32-bit graphic primitives ) | CF_HDROP | 15 | Format of "dropped" file (in Windows NT) | CF_LOCALE | 16 | Format local to Windows (in Windows NT) |
- Character string:
Type of data created beforehand. For example:
Data1 is string = CUSTOMER.KEY + TAB + INVOICE.PRICE DnDCacheData("MyType", Data1)
The "MyType" type will correspond to what was assigned to the "Data" string.
Remarks The following variables can be used: | | Variable name | Description |
---|
_DND.Action | Action specified in DnDAccept. The possible values are: dndCopy, dndMove and dndNone. This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant). | _DND.TargetControl | Name of the target control. This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant). | _DND.SourceControl | Name of source control. | _DND.CtrlDown | Status of Ctrl key:- True: the Ctrl key is pressed.
- False: the Ctrl key is not pressed.
This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant). | _DND.SourceWin | Name of source window. This variable is not filled when exiting from a target control (dndDragLeave constant). | _DND.MouseXPos | Horizontal position (X) of mouse cursor in relation to the control handled during the event. This variable is not filled when exiting from a target control (dndDragLeave constant). | _DND.MouseYPos | Vertical position (Y) of mouse cursor in relation to the control handled during the event. This variable is not filled when exiting from a target control (dndDragLeave constant). |
The _DND.SourceControl and _DND.SourceWin variables return an empty string ("") when the Drag and Drop comes from an application other than the current application.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|