GetData Method


GetData Method

Location

My.Computer.Clipboard.GetData

Syntax

     Dim result As Object = My.Computer.Clipboard.GetData(format) 


format (required; String)

The named format of the data to return from the clipboard

Description

The GetData method returns data from the system clipboard in the specified custom named format.

Usage at a Glance

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

  • Always use the My.Computer.Clipboard.ContainsData method to check for the presence of the specified named custom data before using this method.

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

Example

The following example reads specialized data from the system clipboard and acts on it.

     Dim secretData As Object     If (My.Computer.Clipboard.ContainsData("secretCode") = True) Then        secretData = My.Computer.Clipboard.GetData("secretCode")        MsgBox(DecodeSecret(secretData))     End If 

Related Framework Entries

  • Microsoft.VisualBasic.MyServices.ClipboardProxy.GetData Method

  • System.Windows.Forms.Clipboard.GetData Method

See Also

Clipboard Object, ContainsData Method, GetAudioStream Method, GetDataObject Method, GetFileDropList Method, GetImage Method, GetText Method, SetData 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