System.Windows.Forms.DataFormats.GetFormat Method

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

Syntax

public static DataFormats.Format GetFormat (string format)

Parameters

format
The format name.

Returns

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

Remarks

Call DataFormats.GetFormat(string) with the format name when you need a Windows Clipboard numeric ID for an existing format.

Call this method with your own format name to create a new System.Windows.Forms.Clipboard format type. If the specified format does not exist, this method will register the name as a Clipboard format with the Windows registry and get a unique format identifier. This new name/ID pair will be added to the static list of format name/ID pairs in the System.Windows.Forms.DataFormats class.

Requirements

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