I'm using Clipboard.SetImage to copy an image, I can paste this image in to mspaint and it works fine. However if I try to paste the image in to WLW it just pastes an empty line. If I开发者_StackOverflow中文版 copy an image from my web browser and then paste that in to WLW then it works as expected. The image is from an ImageList. I've tried simply calling Clipboard.SetImage and I've also tried drawing the image on to a Bitmap and copying that:
Bitmap bmp = new Bitmap(img.Width, img.Height);
Graphics gfx = Graphics.FromImage(bmp);
gfx.Clear(Color.White);
gfx.DrawImageUnscaled(img, new Point(0, 0));
gfx.Dispose();
Clipboard.SetImage(bmp);
Any help would be great,
Thanks,
Joe
精彩评论