ClipboardProxy.SetData Method

Note: This method is new in the .NET Framework version 2.0.

Writes data in a custom format to the Clipboard.

Namespace: Microsoft.VisualBasic.MyServices
Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)

public void SetData (
	string format,
	Object data
)
public void SetData (
	String format, 
	Object data
)
public function SetData (
	format : String, 
	data : Object
)

Parameters

format

String. Format of data. Required.

data

Object. Data object to be written to the Clipboard. Required.

For more detailed information, see the Visual Basic topic My.Computer.Clipboard.SetData Method.

Security noteSecurity Note

Because the Clipboard can be accessed by other users, do not use it to store sensitive information, such as passwords or confidential data.

This example writes the DataObjectdataChunk to the Clipboard in the custom format specialFormat.

My.Computer.Clipboard.SetData("specialFormat", dataChunk)

This example depends on the existence of the custom data format specialFormat.

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.

.NET Framework

Supported in: 2.0
Show: