DataFormats.Format Class
.NET Framework 3.0
Represents a Clipboard format type.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
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; }
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.set_Text("ID value: "
+ myFormat.get_Id() + '\n' + "Format name: " + myFormat.get_Name());
} //GetMyFormatInfomation
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: