Live Chat Icon For mobile
Live Chat Icon

How can I copy a bitmap from the clipboard to a PictureBox?

Platform: WinForms| Category: PictureBox

This code snippet shows how you can set your PictureBox’s image to be the image from the clipboard:


[C#]
this.pictureBox1.Image = (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap);
[VB.Net]
Me.pictureBox1.Image = CType(Clipboard.GetDataObject().GetData(DataFormats.Bitmap), Bitmap)

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.