My.Computer.Clipboard.Clear Method 

Clears the Clipboard.

' Usage
My.Computer.Clipboard.Clear()
' Declaration
Public Sub Clear()

Remarks

The UIPermission class controls access to the Clipboard, and the associated UIPermissionClipboard enumeration value indicates the level of access. For more information, see Additional Security Considerations in Windows Forms.

Tasks

The following table lists an example of a task involving the My.Computer.Clipboard.Clear method.

To See

Clear the Clipboard

How to: Clear the Clipboard in Visual Basic

Example

This example clears the Clipboard.

My.Computer.Clipboard.Clear()

This removes all data from the Clipboard.

Requirements

Namespace: Microsoft.VisualBasic.MyServices

Class: ClipboardProxy (provides access to Clipboard)

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Availability by Project Type

Project type Available

Windows Application

Yes

Class Library

Yes

Console Application

Yes

Windows Control Library

Yes

Web Control Library

No

Windows Service

Yes

Web Site

No

Permissions

No permissions are required.

See Also

Tasks

How to: Clear the Clipboard in Visual Basic

Reference

My.Computer.Clipboard Object
My.Computer.Clipboard Object Members
System.Windows.Forms.Clipboard.Clear