Sajitha Rathnayake
Sajitha Rathnayake

Reputation: 1728

Get imagelist image to Clipboard

I need to get image in to Imagelist to windows clipboard. I don't want to save that image in the computer. I found lots of article and post that explaining how to set image to Picturebox from clipboard. But I need the opposite direction.

Is there any code support for vb.net or C#?

Upvotes: 1

Views: 485

Answers (1)

Sinatr
Sinatr

Reputation: 21999

It's as simple as

Clipboard.SetImage(pictureBox.Image);

If you have ImageList, then

Clipboard.SetImage(imageList.Images[index]);

Upvotes: 2

Related Questions