DataFormats::Format Class
Represents a Clipboard format type.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Name | Description | |
|---|---|---|
![]() | DataFormats::Format(String^, Int32) | This API supports the product infrastructure and is not intended to be used directly from your code. 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 the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | 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 = String::Format( "ID value: {0}\nFormat name: {1}", myFormat->Id, myFormat->Name ); }
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


