Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

load Image from the Clipboard

5 views
Skip to first unread message

Aitham Aalama

unread,
May 30, 2002, 1:46:15 PM5/30/02
to
Hi all

May you kindly tell me how to load image from the clipboard into PicturBox

Regards


Armin Zingler

unread,
May 30, 2002, 4:16:07 PM5/30/02
to
"Aitham Aalama" <hai...@balooshy.com> schrieb

> May you kindly tell me how to load image from the clipboard into
> PicturBox

Public Function GetClipboardBitmap() As Bitmap

Dim DataObject As IDataObject

DataObject = Clipboard.GetDataObject

If Not DataObject Is Nothing Then
Dim BmpType = GetType(Drawing.Bitmap)

If DataObject.GetDataPresent(BmpType) Then
Return DataObject.GetData(BmpType)
End If
End If

End Function

....
PictureBox1.Image = GetClipboardBitmap()


Armin

0 new messages