|
Il presente articolo è stato tradotto automaticamente. Passare il puntatore sulle frasi nell'articolo per visualizzare il testo originale. Ulteriori informazioni.
|
Traduzione
Originale
|
Campo DataFormats.StringFormat
Spazio dei nomi: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Nota |
|---|
try { String myString = "This is a String from the ClipBoard"; // Sets the data to the Clipboard. Clipboard.SetDataObject(myString); IDataObject myDataObject = Clipboard.GetDataObject(); // Checks whether the data is present or not in the Clipboard. if(myDataObject.GetDataPresent(DataFormats.StringFormat)) { String clipString = (String)myDataObject.GetData(DataFormats.StringFormat); Console.WriteLine(clipString); } else { Console.WriteLine("No String information was contained in the clipboard."); } } catch(Exception e) { Console.WriteLine(e.Message); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (ruoli di base del server non supportati), Windows Server 2008 R2 (ruoli di base del server supportati con SP1 o versione successiva, Itanium non supportato)
.NET Framework non supporta tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.
Nota