Siebel VB Language Reference > VB Language Reference >

Clipboard Methods


The Clipboard methods are standard VB methods that allow you to access the Windows Clipboard as an object.

Syntax

Clipboard.Clear
Clipboard.GetText()
Clipboard.SetText string
Clipboard.GetFormat()

Argument
Description

string

A string or string expression containing the text to send to the Clipboard

Returns

Not applicable

Usage

The Windows Clipboard can be accessed directly by your program so you can transfer text to and from other applications that support the Clipboard. The supported Clipboard methods are as follows:

Method
Description

Clear

Clears the contents of the Clipboard

GetText

Returns a text string from the Clipboard

SetText

Puts a text string on the Clipboard

GetFormat

Returns TRUE (non-zero) if the format of the item on the Clipboard is text; otherwise, returns FALSE (0)

NOTE:  Data on the Clipboard is lost when another set of data of the same format is placed on the Clipboard (either through code or through a cut or copy operation in an application).

Example

This example places the text string "Hello, world." on the Clipboard.

Sub Button_Click
   Dim mytext as String
   mytext = "Hello, world."
   Clipboard.Settext mytext
End Sub

Siebel VB Language Reference Copyright © 2006, Oracle. All rights reserved.