GetImage Method


GetImage Method

Location

My.Computer.Clipboard.GetImage

Syntax

     Dim result As System.Drawing.Image = _        My.Computer.Clipboard.GetImage(  ) 

Description

The GetImage method returns an image from the system clipboard.

Usage at a Glance

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

  • Always use the My.Computer.Clipboard.ContainsImage method to check for the presence of the desired data format before using this method.

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

  • If the clipboard does not contain image data, Nothing is returned.

Example

The following example displays an image from the system clipboard if it contains an image. This example assumes that your form includes a picture box control named PictureBox1.

     If (My.Computer.Clipboard.ContainsImage(  ) = True) Then        PictureBox1.Image = My.Computer.Clipboard.GetImage(  )     End If 

Related Framework Entries

  • Microsoft.VisualBasic.MyServices.ClipboardProxy.GetImage Method

  • System.Windows.Forms.Clipboard.GetImage Method

See Also

Clipboard Object, ContainsImage Method, GetAudioStream Method, GetData Method, GetDataObject Method, GetFileDropList Method, GetImage Method, GetText Method, SetImage 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