ClipboardProxy Class
Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)
For more detailed information, see the Visual Basic topic My.Computer.Clipboard Object.
Items moved or copied to the Clipboard persist even after the application is shut down.
Data on the Clipboard can be in any data format, also called a Clipboard format. For a list of predefined formats to use with the Clipboard, see DataFormats. When an item is moved or copied to the Clipboard, items in other formats are cleared. To make other formats persist, use DataObject, which copies everything existing on the current Clipboard, including items pasted from other applications. Place data on the Clipboard in multiple formats to maximize the possibility that a target application, whose format requirements you might not know, can successfully retrieve the data.
Because all Windows applications share the system Clipboard, the contents may change when you switch to another application.
A class must be serializable for it to be put on the Clipboard. See Serialization for more information.
When accessing the Clipboard remotely, a ThreadStateException is thrown unless the accessing thread operates in STA (single-threaded apartment) mode. To resolve this issue, set the ThreadApartmentState to STA. For more information, see STAThreadAttribute.
The following table lists examples of tasks involving the My.Computer.Clipboard object.
| To | See |
|---|---|
| Clear the Clipboard | |
| Read from the Clipboard | |
| Find out what is stored on the Clipboard | How to: Determine What Type of File is Stored on the Clipboard in Visual Basic |
| Save audio to the Clipboard | How to: Save an Audio Stream to the Clipboard in Visual Basic |
| Get an image from the Clipboard | How to: Retrieve an Image from the Clipboard in Visual Basic |
| Store data to the Clipboard |
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.