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

WindowsClipboardMBS.Clear
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Clears the contents of the clipboard.

Feedback, Comments & Corrections

WindowsClipboardMBS.ClipboardFormats as Integer()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Returns an array with all clipboard formats currently in the clipboard.

Feedback, Comments & Corrections

WindowsClipboardMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Connects to the clipboard.
Notes: 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.

Feedback, Comments & Corrections

WindowsClipboardMBS.CountClipboardFormats as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Retrieves the number of different data formats currently on the clipboard.
Notes:
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.

Feedback, Comments & Corrections

WindowsClipboardMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Automatically closes the clipboard.

Feedback, Comments & Corrections

WindowsClipboardMBS.EnumClipboardFormats(format as Integer = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Enumerates the data formats currently available on the clipboard.
Notes:
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.

Feedback, Comments & Corrections

WindowsClipboardMBS.GetData(type as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Retrieves data from the clipboard in a specified format.
Notes:
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.

Feedback, Comments & Corrections

WindowsClipboardMBS.GetDIB as Picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 17.4 No Yes No No No
Function: Queries DIB picture on the clipboard.
Notes:
Returns nil on any error.
This is using DIB type in database for a Device Independent Bitmap.

Feedback, Comments & Corrections

WindowsClipboardMBS.GetFiles as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 15.1 No Yes No Yes, Windows only No
Function: Queries list of file paths on the clipboard.
Notes: This is for working with Explorers copy & paste feature.

Feedback, Comments & Corrections

WindowsClipboardMBS.GetPicture as Picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 14.4 No Yes No No No
Function: Queries bitmap on the clipboard.
Notes:
Returns nil on any error.
This is using BITMAP type in database for a bitmap handle.

Feedback, Comments & Corrections

WindowsClipboardMBS.SetData(type as Integer, rawData as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Places data on the clipboard in a specified clipboard format.
Notes:
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.

Feedback, Comments & Corrections

WindowsClipboardMBS.SetDIB(pic as Picture) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 17.4 No Yes No No No
Function: Puts a DIB picture on the clipboard.
Notes:
Returns true on success.
This is using DIB type in database for a Device Independent Bitmap.

Feedback, Comments & Corrections

WindowsClipboardMBS.SetFiles(paths() as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 15.1 No Yes No Yes, Windows only No
Function: Puts a list of file paths on the clipboard.
Notes:
This is for working with Explorers copy & paste feature.
Returns true on success.
Folder paths may work better if they have no training backslash.

Feedback, Comments & Corrections

WindowsClipboardMBS.SetPicture(pic as Picture) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Windows MBS Win Plugin 14.4 No Yes No No No
Function: Puts a bitmap picture on the clipboard.
Notes:
Returns true on success.
This is using BITMAP type in database for a bitmap handle.

Feedback, Comments & Corrections

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




Links
MBS Xojo tutorial videos