GetText Method


GetText Method

Location

My.Computer.Clipboard.GetText

Syntax

     Dim result As String = My.Computer.Clipboard.GetText([format]) 


format (optional; TextDataFormat enumeration)

The specific format of the text to retrieve from the system clipboard. One of the following System.Windows.Forms.TextDataFormat enumeration values.

Value

Description

Not supplied

Any type of text

CommaSeparatedValue

Comma-separated fields of data in one or more records

Html

HTML format

Rtf

Rich Text Format

UnicodeText

16-bit Unicode character text


If this parameter is not specified, CommaSeparatedValue is used by default.

Description

The GetText method returns a String of text retrieved from the system clipboard in a specified text format. If the specified text data is not present on the clipboard, an empty string is returned.

Usage at a Glance

  • This method is only valid in non-server applications.

  • Security restrictions in place for the active user may limit access to the system clipboard.

Related Framework Entries

  • Microsoft.VisualBasic.MyServices.ClipboardProxy.GetText Method

  • System.Windows.Forms.Clipboard.GetText Method

See Also

Clipboard Object, ContainsText Method, GetAudioStream Method, GetData Method, GetDataObject Method, GetFileDropList Method, GetImage Method, GetText Method, SetText Method




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net