Redigera

Dela via


ClipboardProxy.ContainsData(String) Method

Definition

Indicates whether the Clipboard contains data in the specified custom format.

public:
 bool ContainsData(System::String ^ format);
public bool ContainsData (string format);
member this.ContainsData : string -> bool
Public Function ContainsData (format As String) As Boolean

Parameters

format
String

String. Name of the custom format to be checked. Required.

Returns

True if data in the specified custom format is stored on the Clipboard; otherwise False.

Examples

This example checks for data in the custom format specialFormat.

If My.Computer.Clipboard.ContainsData("specialFormat") Then
   MsgBox("Data found.")
End If

Replace specialFormat with the name of the custom format you wish to check.

Remarks

If you have placed custom formatted data on the Clipboard, this method allows you to check the Clipboard for data in that format.

Availability by Project Type

Project type Available
Windows Application Yes
Class Library Yes
Console Application Yes
Windows Control Library Yes
Web Control Library No
Windows Service Yes
Web Site No

Applies to

See also