Name
Clipboard.SetDataObject Method
Class
System.Windows.Forms.Clipboard
Syntax
SetDataObject(data
)
-
data
(required; any) Data to place on the Clipboard
Description
Places data on the Clipboard
Example
The following example places text on the clipboard:
Dim s As String = "donna" clipboard.SetDataObject(s)
VB.NET/VB 6 Differences
While the .NET Base Class Library uses the SetDataObject method to place all data on the Clipboard, the Clipboard object in VB 6 includes two methods, SetData and SetText, depending on the format of the data to be placed on the Clipboard.
Get VB.NET Language in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.