DataFormats.Dif フィールド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Windows フォームが直接使用しないWindowsデータ交換形式 (DIF) を指定します。 この static フィールドは読み取り専用です。
public: static initonly System::String ^ Dif;
public static readonly string Dif;
staticval mutable Dif : string
Public Shared ReadOnly Dif As String
フィールド値
例
次のコード例は、このメンバーの使用方法を示しています。
FileStream^ myFileStream = File::Open( "Temp.dif", FileMode::Open );
// Store the data into Dif format.
DataObject^ myDataObject = gcnew DataObject;
myDataObject->SetData( DataFormats::Dif, myFileStream );
// Check whether the data is stored or not in the specified format.
bool formatPresent = myDataObject->GetDataPresent( DataFormats::Dif );
if ( formatPresent )
{
Console::WriteLine( "The data has been stored in the Dif format is:'{0}'", formatPresent );
}
else
{
Console::WriteLine( "The data has not been stored in the specified format" );
}
FileStream myFileStream = File.Open("Temp.dif",FileMode.Open);
// Store the data into Dif format.
DataObject myDataObject = new DataObject();
myDataObject.SetData(DataFormats.Dif,myFileStream);
// Check whether the data is stored or not in the specified format.
bool formatPresent = myDataObject.GetDataPresent(DataFormats.Dif);
if(formatPresent)
{
Console.WriteLine("The data has been stored in the Dif format is:'"+formatPresent+"'");
}
else
{
Console.WriteLine("The data has not been stored in the specified format");
}
Dim myFileStream As FileStream = File.Open("Temp.dif", FileMode.Open)
' Store the data into Dif format.
Dim myDataObject As New DataObject()
myDataObject.SetData(DataFormats.Dif, myFileStream)
' Check whether the data is stored or not in the specified format.
Dim formatPresent As Boolean = myDataObject.GetDataPresent(DataFormats.Dif)
If formatPresent Then
Console.WriteLine(("The data has been stored in the Dif format is:'" + formatPresent.ToString() + "'"))
Else
Console.WriteLine("The data has not been stored in the specified format")
End If
注釈
DIF は ASCII コードで構成される形式で、データベース、スプレッドシート、および類似のドキュメントを構造化して、他のプログラムによる使用や他のプログラムへの転送を容易にすることができます。
このフィールドは、データ型を指定するために、 IDataObject インターフェイスと DataObject クラスによって使用されます。
IDataObjectまたはDataObjectの実装に追加する場合は、このフィールドをIDataObject.SetDataおよびDataObject.SetDataメソッドの形式として使用します。
この型のオブジェクトが存在するかどうかを確認するには、このフィールドを IDataObject.GetDataPresent メソッドおよび DataObject.GetDataPresent メソッドの形式として使用します。
この型のオブジェクトを取得するには、これを IDataObject.GetData メソッドと DataObject.GetData メソッドの形式として使用します。