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.ClipboardSequenceNumber as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Retrieves the clipboard sequence number for the current window station.
Notes:
The return value is the clipboard sequence number. If you do not have WINSTA_ACCESSCLIPBOARD access to the window station, the function returns zero.

The system keeps a serial number for the clipboard for each window station. This number is incremented whenever the contents of the clipboard change or the clipboard is emptied. You can track this value to determine whether the clipboard contents have changed and optimize creating DataObjects. If clipboard rendering is delayed, the sequence number is not incremented until the changes are rendered.

Feedback, Comments & Corrections

WindowsClipboardMBS.GetClipboardFormatName(format as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Retrieves from the clipboard the name of the specified registered format. The function copies the name to the specified buffer.
Example:
// show items on clipboard

dim w as new WindowsClipboardMBS
dim types(-1) as integer = w.ClipboardFormats
dim names() as string

for each type as integer in types
dim n as string = w.GetClipboardFormatName(type)

n = str(type)+" "+n

names.append n
next

MsgBox Join(names,EndOfLine)

Feedback, Comments & Corrections

WindowsClipboardMBS.IsClipboardFormatAvailable(type as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Windows MBS Win Plugin 10.4 No Yes No Yes, Windows only No
Function: Determines whether the clipboard contains data in the specified format.
Notes:
type: A standard or registered clipboard format.

If the clipboard format is available, the return value is true.
If the clipboard format is not available, the return value is false.

Typically, an application that recognizes only one clipboard format would call this function when processing the EnableMenuItems event. The application would then enable or disable the Paste menu item, depending on the return value.

Feedback, Comments & Corrections

WindowsClipboardMBS.RegisterClipboardFormat(type as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Windows MBS Win Plugin 13.0 No Yes No Yes, Windows only No
Function: Registers a new clipboard format. This format can then be used as a valid clipboard format.
Example:
dim TypeHTML as Integer
dim TypeRTF as Integer

TypeHTML = WindowsClipboardMBS.RegisterClipboardFormat("HTML Format")
TypeRTF = WindowsClipboardMBS.RegisterClipboardFormat("Rich Text Format")
Notes:
If the function succeeds, the return value identifies the registered clipboard format.
If the function fails, the return value is zero.

If a registered format with the specified name already exists, a new format is not registered and the return value identifies the existing format. This enables more than one application to copy and paste data using the same registered clipboard format. Note that the format name comparison is case-insensitive.
Registered clipboard formats are identified by values in the range &hC000 through &hFFFF.

Feedback, Comments & Corrections

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




Links
MBS Xojo PDF Plugins