Pano'da Metin Nasıl Depolanır
Aşağıdaki kod örneği dir dizeyi saklamak için System.Windows.Forms ad alanında tanımlanan Clipboard nesnesini kullanılır. Bu nesne iki üye işlev sağlar: SetDataObject ve GetDataObject. Veriler Object üzerinden SetDataObject üzerine türetilmiş herhangi bir nesne gönderilerek Pano üzerinde depolanır.
Örnek
// store_clipboard.cpp
// compile with: /clr
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>
using namespace System;
using namespace System::Windows::Forms;
[STAThread] int main()
{
String^ str = "This text is copied into the Clipboard.";
// Use 'true' as the second argument if
// the data is to remain in the clipboard
// after the program terminates.
Clipboard::SetDataObject(str, true);
Console::WriteLine("Added text to the Clipboard.");
return 0;
}