JavaScript EditorDhtml editor     Free javascript download 

Main Page

The following code example uses the Clipboard object defined in the System.Windows.Forms namespace to store a string. This object provides two member functions: SetDataObject and GetDataObject. Data is stored in the Clipboard by sending any object derived from Object to SetDataObject.


В CopyCode imageCopy Code
// 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;

See Also

JavaScript EditorDhtml editor     Free javascript download