DataFormats.Format Class
Represents a Clipboard format type.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The DataFormats.Format type exposes the following members.
Name | Description | |
---|---|---|
![]() | DataFormats.Format | Infrastructure. Initializes a new instance of the DataFormats.Format class with a Boolean that indicates whether a Win32 handle is expected. |
Name | Description | |
---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
A format type consists of a text-based format name and an ID number. The format name/ID number pair can define a system Clipboard or other format.
The following code example shows how to retrieve a DataFormats.Format representing a format name/ID pair. The UnicodeText format is requested, and the contents of the retrieved DataFormats.Format are displayed in a text box.
This code requires that textBox1 has been created.
private void GetMyFormatInfomation() { // Creates a DataFormats.Format for the Unicode data format. DataFormats.Format myFormat = DataFormats.GetFormat(DataFormats.UnicodeText); // Displays the contents of myFormat. textBox1.Text = "ID value: " + myFormat.Id + '\n' + "Format name: " + myFormat.Name; }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.