Selasa, 21 Juli 2009

Retrieving Data / Pictures

GetData function is used to retrieve the contents of the clipboard
can be a text or image.

Basic syntax:
Clipboard.Getdata ([format clipboard])

Clipboard format consists of several types of

Constant value description
-------------------------------------------------- -----
vbCFBitmap 2 Bitmap (. bmp files)
vbCFMetafile 3 Metafile (. wmf files)
vbCFDIB 8-Device independent bitmap (DIB)
vbCFPalette 9 Color palette


Example:

Dim Msg
On Error Resume Next
Msg = "Choose OK to load bitmap into the clipboard."
MsgBox Msg
Clipboard.Clear 'Clear the Clipboard.

'Take a picture of the file and save it to the clipboard
Clipboard.SetData LoadPicture ( "C: \ vbBego.BMP")

MsgBox "Showing a picture from the clipboard"
Picture = Clipboard.GetData () 'Copy from Clipboard.


Tidak ada komentar:

Posting Komentar