O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required