Platforms to show: All Mac Windows Linux Cross-Platform
Back to WinDataObjectMBS class.
WinDataObjectMBS.AddDragImage(pic as picture, width as Integer, height as Integer, x as Integer, y as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 11.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
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:
Some examples using this method:
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 | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
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:
WinDataObjectMBS.AddFiles(files() as folderitem)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
See also:
WinDataObjectMBS.AddFiles(pathes() as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 11.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Folder pathes should have no backslash on the end.
See also:
WinDataObjectMBS.AddPicture(pic as picture)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
WinDataObjectMBS.AddRaw(format as Integer, data as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Depending of the format you may need to add chr(0) on the end.
WinDataObjectMBS.AddText(text as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
See also:
WinDataObjectMBS.Constructor(files() as folderitem)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
See also:
WinDataObjectMBS.Constructor(pic as picture)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
See also:
WinDataObjectMBS.Constructor(text as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
See also:
WinDataObjectMBS.Formats as String()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 16.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Helps for debugging to see what is inside.
WinDataObjectMBS.GetFileContents(index as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 11.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
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.
Only accepts data provided as blob.
See also:
Some examples using this method:
WinDataObjectMBS.GetFileContents(index as integer, byref IsPath as boolean) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
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.
IsPath is set to true, when the returned data is a file path instead of data itself.
See also:
WinDataObjectMBS.GetFileDescriptors as WindowsFileDescriptorMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 11.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Result array is empty on any error.
Some examples using this method:
WinDataObjectMBS.GetFileName as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 16.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
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.
Some examples using this method:
WinDataObjectMBS.GetPaths as folderitem()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Checks for a CF_HDROP type. May return one or more folderitems.
Some examples using this method:
WinDataObjectMBS.GetPathStrings as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 11.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Checks for a CF_HDROP type. May return one or more folderitems.
WinDataObjectMBS.GetPicture as picture
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
Supports CF_BITMAP/TYMED_GDI.
WinDataObjectMBS.GetRaw(format as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
WinDataObjectMBS.GetText as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns unicode or ANSI text depending on what is available. Unicode is preferred.
WinDataObjectMBS.HasFileDescriptors as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 11.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
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.
Some examples using this method:
WinDataObjectMBS.HasFileName as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 16.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
WinDataObjectMBS.HasPaths as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns true if a path is found.
Checks for CF_HDROP.
Some examples using this method:
WinDataObjectMBS.HasPicture as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns true if a picture is found.
Checks for CF_BITMAP.
Some examples using this method:
WinDataObjectMBS.HasRaw(format as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
WinDataObjectMBS.HasText as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Drag & Drop | MBS Win Plugin | 10.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns true if text is found.
Checks for CF_UNICODETEXT and CF_TEXT.
The items on this page are in the following plugins: MBS Win Plugin.