System.Windows.Forms.DataFormats.GetFormat Method

Returns a System.Windows.Forms.DataFormats.Format with the Windows Clipboard numeric ID and name for the specified ID.

Syntax

public static DataFormats.Format GetFormat (int id)

Parameters

id
The format ID.

Returns

A System.Windows.Forms.DataFormats.Format that has the Windows Clipboard numeric ID and the name of the format.

Remarks

This member is typically used to register native Clipboard formats.

Call DataFormats.GetFormat(string) with an ID number when you want to retrieve a System.Windows.Forms.DataFormats.Format instance that contains the ID/format name pair. Typically, the ID name and number is published by the creator of the application that you are using the System.Windows.Forms.Clipboard to interface with. For example, the ID number for Dynamic Data Exchange (DDE) conversation information in Visual Basic is &HBF00, and the format name is vbCFLink.

Call this method with any unique ID number to add the ID/format name pair to the static list of format name/ID pairs in the System.Windows.Forms.DataFormats class. The new name will be created by concatenating "Format" and the ID number. This pair is not registered as a new System.Windows.Forms.Clipboard format because you have not provided a name.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0