Search code examples
c#vb.netclipboardpictureboximagelist

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#?


Solution

  • It's as simple as

    Clipboard.SetImage(pictureBox.Image);
    

    If you have ImageList, then

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