Share via


ClipboardObject Class

Definition

Represents a clipboard object that interoperates between System.Windows.Forms.IDataObject, System.Runtime.InteropServices.Comtypes.IDataObject and Microsoft.VisualStudio.OLE.Interop.IDataObject.

public ref class ClipboardObject : System::Windows::Forms::DataObject, Microsoft::VisualStudio::OLE::Interop::IDataObject, System::Runtime::InteropServices::ComTypes::IDataObject
public class ClipboardObject : System.Windows.Forms.DataObject, Microsoft.VisualStudio.OLE.Interop.IDataObject, System.Runtime.InteropServices.ComTypes.IDataObject
type ClipboardObject = class
    inherit DataObject
    interface IDataObject
    interface IDataObject
Public Class ClipboardObject
Inherits DataObject
Implements IDataObject, IDataObject
Inheritance
ClipboardObject
Derived
Implements

Constructors

ClipboardObject()

Constructs a new clipboard object based on the standard System.Windows.Forms.DataObject class.

ClipboardObject(Object)

Constructs a new or wraps an existing clipboard object based on the specified data. If the data is already a clipboard object, it is wrapped; otherwise, a new clipboard object is created to contain the data.

ClipboardObject(String, Object)

Constructs a new data object with the specified data in the specified format.

Methods

GetData(String, Boolean)

Retrieves the data stored in the clipboard object in the specified format, using an automated conversion parameter to determine whether to convert the data to the format.

GetData(String)

Retrieves the data stored in the clipboard object in the specified format.

GetData(Type)

Retrieves the data stored in the clipboard object in the specified format.

GetDataPresent(String, Boolean)

Indicates whether data stored in the clipboard object can be converted to or is associated with the specified format, using an automatic conversion parameter to determine whether to convert the data to the format.

GetDataPresent(String)

Indicates whether data stored in the clipboard object can be converted to or is associated with the specified format.

GetDataPresent(Type)

Indicates whether data stored in the clipboard object can be converted to or is associated with the specified format.

GetFormats()

Retrieves a list of all formats that are supported for the data stored in the clipboard object.

GetFormats(Boolean)

Retrieves a list of all formats that are supported for the data stored in the clipboard object, using an automatic conversion parameter to determine whether to retrieve only native data formats or all formats that the data can be converted to.

SetData(Object)

Adds data to the clipboard object.

SetData(String, Boolean, Object)

Adds data to the clipboard object.

SetData(String, Object)

Adds data to the clipboard object in the specified format.

SetData(Type, Object)

Adds data to the clipboard object, using the specified type as the format.

Explicit Interface Implementations

IDataObject.DAdvise(FORMATETC, ADVF, IAdviseSink, Int32)

Creates a connection between the clipboard object and an advisory sink. This method is called by an object that supports an advisory sink and enables the advisory sink to be notified of changes in the object's data.

IDataObject.DAdvise(FORMATETC[], UInt32, IAdviseSink, UInt32)

Creates a connection between the clipboard object and an advisory sink. This method is called by an object that supports an advisory sink and enables the advisory sink to be notified of changes in the object's data.

IDataObject.DUnadvise(Int32)

Removes a notification connection that had been previously established.

IDataObject.DUnadvise(UInt32)

Removes a notification connection that has been established.

IDataObject.EnumDAdvise(IEnumSTATDATA)

Creates an object that can be used to enumerate the current advisory connections.

IDataObject.EnumDAdvise(IEnumSTATDATA)

Creates an object that can be used to enumerate the current advisory connections.

IDataObject.EnumFormatEtc(DATADIR)

Creates an object for enumerating the FORMATETC structures for a data object. These structures are used in calls to IDataObject.GetData(FORMATETC, STGMEDIUM) or IDataObject.SetData(FORMATETC, STGMEDIUM, Boolean).

IDataObject.EnumFormatEtc(UInt32, IEnumFORMATETC)

Creates an object for enumerating the FORMATETC structures for a data object. These structures are used in calls to IDataObject.GetData(FORMATETC[], STGMEDIUM[]) or IDataObject.SetData(FORMATETC[], STGMEDIUM[], Int32).

IDataObject.GetCanonicalFormatEtc(FORMATETC, FORMATETC)

Provides a standard FORMATETC structure that is logically equivalent to a more complex structure. Use this method to determine whether two different FORMATETC structures return the same data, removing the need for duplicate rendering.

IDataObject.GetCanonicalFormatEtc(FORMATETC[], FORMATETC[])

Provides a standard FORMATETC structure that is logically equivalent to a more complex structure. Use this method to determine whether two different FORMATETC structures return the same data, removing the need for duplicate rendering.

IDataObject.GetData(FORMATETC, STGMEDIUM)

Obtains data from a source data object. This method is called by a data consumer. It renders the data described in the specified FORMATETC structure and transfers it through the specified STGMEDIUM structure. The caller then assumes responsibility for releasing the STGMEDIUM structure.

IDataObject.GetData(FORMATETC[], STGMEDIUM[])

Obtains data from a source data object. This method is called by a data consumer. It renders the data described in the specified FORMATETC structure and transfers it through the specified STGMEDIUM structure. The caller then assumes responsibility for releasing the STGMEDIUM structure.

IDataObject.GetDataHere(FORMATETC, STGMEDIUM)

Obtains data from a source data object. This method, which is called by a data consumer, differs from the IDataObject.GetData(FORMATETC, STGMEDIUM) method in that the caller must allocate and free the specified storage medium.

IDataObject.GetDataHere(FORMATETC[], STGMEDIUM[])

Obtains data from a source data object. This method, which is called by a data consumer, differs from the IDataObject.GetData(FORMATETC[], STGMEDIUM[]) method in that the caller must allocate and free the specified storage medium.

IDataObject.QueryGetData(FORMATETC)

Determines whether the data object is capable of rendering the data described in the FORMATETC structure. Objects attempting a paste or drop operation can call this method before calling IDataObject.GetData(FORMATETC, STGMEDIUM) to get an indication of whether the operation will be successful.

IDataObject.QueryGetData(FORMATETC[])

Determines whether the data object is capable of rendering the data described in the FORMATETC structure. Objects attempting a paste or drop operation can call this method before calling IDataObject.GetData(FORMATETC[], STGMEDIUM[]) to get an indication of whether the operation will be successful.

IDataObject.SetData(FORMATETC, STGMEDIUM, Boolean)

Transfers data to the object that implements this method. This method is called by an object that contains a data source.

IDataObject.SetData(FORMATETC[], STGMEDIUM[], Int32)

Transfers data to the object that implements this method. This method is called by an object that contains a data source.

Applies to