Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

WinDataObjectMBS.AddDragImage(pic as picture, width as Integer, height as Integer, x as Integer, y as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 11.0 No Yes No No No
Function: Adds a drag image to the data object.
Notes:
pic: the picture to use.
width and height: The size of the picture.
x and y: The location of the cursor within the drag image. The point should contain the offset from the upper-left corner of the drag image to the location of the cursor.

Requires Windows 2000 Professional with SP3, Windows XP.
On success the HelperHandle property is not zero.

Turn off antialiasing when drawing text. Otherwise, artifacts could occur at the edges, between the text color and the color key.

This function takes the picture (and it's mask) and turns it in a nice drag picture. This includes applying the mask and passing black for the background color. Dark colors which should be transparent will be made lighter.

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.AddDragImage(pic as picture, width as Integer, height as Integer, x as Integer, y as Integer, ImageBackgroundColor as color)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No No No
Function: Adds a drag image to the data object.
Notes:
pic: the picture to use.
width and height: The size of the picture.
x and y: The location of the cursor within the drag image. The point should contain the offset from the upper-left corner of the drag image to the location of the cursor.
ImageBackgroundColor: The color used by the control to fill the background of the drag image.

Requires Windows 2000 Professional with SP3, Windows XP.
On success the HelperHandle property is not zero.

Turn off antialiasing when drawing text. Otherwise, artifacts could occur at the edges, between the text color and the color key.

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.AddFiles(files() as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Adds file references in the format the explorer can understand them.

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.AddFiles(pathes() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 11.0 No Yes No Yes, Windows only No
Function: Adds file pathes in the format the explorer can understand them.
Notes: Folder pathes should have no backslash on the end.

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.AddPicture(pic as picture)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No No No
Function: Adds a picture to the data object.

Feedback, Comments & Corrections

WinDataObjectMBS.AddRaw(format as Integer, data as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Adds raw data to the data object.
Notes: Depending of the format you may need to add chr(0) on the end.

Feedback, Comments & Corrections

WinDataObjectMBS.AddText(text as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Adds the text to the data object.

Feedback, Comments & Corrections

WinDataObjectMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Creates an empty data object.

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.Constructor(files() as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Creates a data object and adds the files.

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.Constructor(pic as picture)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No No No
Function: Creates a new data object and adds the given picture.
Example:
// take some picture
dim p as Picture = LogoMBS(500)

// create data object
dim w as new WinDataObjectMBS(p)

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.Constructor(text as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Creates a new data object and adds the given text.
Example:
// create data object with text
dim w as new WinDataObjectMBS("Hello World")

See also:

Feedback, Comments & Corrections

WinDataObjectMBS.Formats as String()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 16.0 No Yes No Yes, Windows only No
Function: Queries list of formats in the data object.
Notes: Helps for debugging to see what is inside.

Feedback, Comments & Corrections

WinDataObjectMBS.GetFileContents(index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 11.2 No Yes No Yes, Windows only No
Function: Queries file content for the file with the given index.
Notes:
Use index from WindowsFileDescriptorMBS.index property.

This works for files up to a few hundred megabytes in size. For larger files we will have to change plugin if you want to receive those.

Feedback, Comments & Corrections

WinDataObjectMBS.GetFileDescriptors as WindowsFileDescriptorMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 11.2 No Yes No Yes, Windows only No
Function: Queries file descriptors.
Example:
dim dataObject as WinDataObjectMBS // your data object

dim des(-1) as WindowsFileDescriptorMBS = dataObject.GetFileDescriptors

for each d as WindowsFileDescriptorMBS in des
// we got file descriptions. Some metadata and the data. No path.
dim data as string = dataObject.GetFileContents(0)
msgbox "File """+d.FileName+""" with "+str(lenb(data))+" bytes data."
next
Notes: Result array is empty on any error.

Feedback, Comments & Corrections

WinDataObjectMBS.GetFileName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 16.0 No Yes No Yes, Windows only No
Function: Queries filename from data object.
Notes:
Depending on how the other application works, the drag data object may have either file descriptors, a file path or path strings.

The file name is valid at least as long as this object is alive.

Feedback, Comments & Corrections

WinDataObjectMBS.GetPaths as folderitem()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Queries the paths in the data object.
Example:
dim dataObject as WinDataObjectMBS // your data object

dim files(-1) as FolderItem = dataObject.GetPaths

for each f as FolderItem in files
// we got a file you can use like any other file (e.g. copy)
listbox1.AddRow "Path """+f.AbsolutePath+""""
next
Notes: Checks for a CF_HDROP type. May return one or more folderitems.

Feedback, Comments & Corrections

WinDataObjectMBS.GetPathStrings as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 11.0 No Yes No Yes, Windows only No
Function: Queries the paths in the data object.
Notes: Checks for a CF_HDROP type. May return one or more folderitems.

Feedback, Comments & Corrections

WinDataObjectMBS.GetPicture as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No No No
Function: Queries the picture from the data object.
Notes: Supports CF_BITMAP/TYMED_GDI.

Feedback, Comments & Corrections

WinDataObjectMBS.GetRaw(format as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Queries the raw data for the given type.

Feedback, Comments & Corrections

WinDataObjectMBS.GetText as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Queries the text from the data object.
Notes: Returns unicode or ANSI text depending on what is available. Unicode is preferred.

Feedback, Comments & Corrections

WinDataObjectMBS.HasFileDescriptors as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 11.2 No Yes No Yes, Windows only No
Function: Checks whether this data object contains file descriptors.
Notes:
Returns true if a path is found.
Checks for CF_FILEGROUPDESCRIPTOR.

Windows uses File Descriptors and FileContents for drag and drop operations where the data is not stored in a file. You get the descriptors and if you need you can get the data which is delivered just in time.

Feedback, Comments & Corrections

WinDataObjectMBS.HasFileName as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 16.0 No Yes No Yes, Windows only No
Function: Checks to see if a filename entry is in the data object.

Feedback, Comments & Corrections

WinDataObjectMBS.HasPaths as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Checks whether this data object contains file paths.
Notes:
Returns true if a path is found.
Checks for CF_HDROP.

Feedback, Comments & Corrections

WinDataObjectMBS.HasPicture as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Checks if a picture is part of this data object.
Notes:
Returns true if a picture is found.
Checks for CF_BITMAP.

Feedback, Comments & Corrections

WinDataObjectMBS.HasRaw(format as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Checks whether this data object contains data in the given format.

Feedback, Comments & Corrections

WinDataObjectMBS.HasText as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Drag & Drop MBS Win Plugin 10.5 No Yes No Yes, Windows only No
Function: Checks whether this data object contains Text or UnicodeText.
Notes:
Returns true if text is found.
Checks for CF_UNICODETEXT and CF_TEXT.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Win Plugin.




Links
MBS FileMaker Plugins