Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsClipboardMBS class.

WindowsClipboardMBS.Clear

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Clears the contents of the clipboard.

WindowsClipboardMBS.ClipboardFormats as Integer()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Returns an array with all clipboard formats currently in the clipboard.

Some examples using this method:

WindowsClipboardMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Connects to the clipboard.

As the clipboard has exclusive access, do not keep WindowsClipboardMBS objects around. Best you only use them within a method so once the method ends, everything is released.

WindowsClipboardMBS.CountClipboardFormats as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Retrieves the number of different data formats currently on the clipboard.

If the function succeeds, the return value is the number of different data formats currently on the clipboard.

If the function fails, the return value is zero.

WindowsClipboardMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Automatically closes the clipboard.

WindowsClipboardMBS.EnumClipboardFormats(format as Integer = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Enumerates the data formats currently available on the clipboard.

Clipboard data formats are stored in an ordered list. To perform an enumeration of clipboard data formats, you make a series of calls to the EnumClipboardFormats function. For each call, the format parameter specifies an available clipboard format, and the function returns the next available clipboard format.

format: A clipboard format that is known to be available.

To start an enumeration of clipboard formats, set format to zero. When format is zero, the function retrieves the first available clipboard format. For subsequent calls during an enumeration, set format to the result of the previous EnumClipboardFormats call.

If the function succeeds, the return value is the clipboard format that follows the specified format, namely the next available clipboard format.

If the function fails, the return value is zero.
If there are no more clipboard formats to enumerate, the return value is zero.

You must open the clipboard before enumerating its formats. Use the OpenClipboard function to open the clipboard. The EnumClipboardFormats function fails if the clipboard is not open.

The EnumClipboardFormats function enumerates formats in the order that they were placed on the clipboard. If you are copying information to the clipboard, add clipboard objects in order from the most descriptive clipboard format to the least descriptive clipboard format. If you are pasting information from the clipboard, retrieve the first clipboard format that you can handle. That will be the most descriptive clipboard format that you can handle.

The system provides automatic type conversions for certain clipboard formats. In the case of such a format, this function enumerates the specified format, then enumerates the formats to which it can be converted. For more information, see Standard Clipboard Formats and Synthesized Clipboard Formats.

WindowsClipboardMBS.GetData(type as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Retrieves data from the clipboard in a specified format.

Format: A clipboard format.

If the function succeeds, the return value is the string with the clipboard data in the specified format.

If the function fails, the return value is "".

An application can enumerate the available formats in advance by using the EnumClipboardFormats function.

WindowsClipboardMBS.GetDIB as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 17.4 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Queries DIB picture on the clipboard.

Returns nil on any error.
This is using DIB type in clipboard for a Device Independent Bitmap.

Please use GetPicture for bitmap handles.

WindowsClipboardMBS.GetFiles as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 15.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Queries list of file paths on the clipboard.

This is for working with Explorers copy & paste feature.

Some examples using this method:

WindowsClipboardMBS.GetPicture as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 14.4 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Queries bitmap on the clipboard.

Returns nil on any error.
This is using BITMAP type in clipboard for a bitmap handle.

Please use GetDIB for Device Independent Bitmap.

WindowsClipboardMBS.SetData(type as Integer, rawData as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Places data on the clipboard in a specified clipboard format.

Format: The clipboard format. This parameter can be a registered format or any of the standard clipboard formats.
rawData: A string with the data in the specified format.

If the function succeeds, the return value is true.
If the function fails, the return value is false.

The system performs implicit data format conversions between certain clipboard formats when an application calls the GetClipboardData function. For example, if the kTypeOEMTEXT format is on the clipboard, a window can retrieve data in the kTypeTEXT format. The format on the clipboard is converted to the requested format on demand. For more information, see Synthesized Clipboard Formats.

WindowsClipboardMBS.SetDIB(pic as Picture) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 17.4 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Puts a DIB picture on the clipboard.

Returns true on success.
This is using DIB type in clipboard for a bitmap handle.

Please use SetPicture for Device Independent Bitmap.

WindowsClipboardMBS.SetFiles(paths() as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 15.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Puts a list of file paths on the clipboard.

This is for working with Explorers copy & paste feature.
Returns true on success.
Folder paths may work better if they have no training backslash.

Some examples using this method:

WindowsClipboardMBS.SetPicture(pic as Picture) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 14.4 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Puts a bitmap picture on the clipboard.

Returns true on success.
This is using BITMAP type in clipboard for a bitmap handle.

Please use SetDIB for Device Independent Bitmap.

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


The biggest plugin in space...