Picturebox graphic to clipboard

  • Thread starter Thread starter Bob Henry
  • Start date Start date
B

Bob Henry

Hello,

This ought to be easy, but I can't figure it out.

In VisualBasic.Net 2003, I've drawn graphics using drawline etc... to a
picturebox. I now want to copy this to the clipboard. I think if I can
convert the image to a bitmap this will work, but I can't figure out how to
do this or to do it more directly. I'd appreciate any help I can get.
 
* "Bob Henry said:
This ought to be easy, but I can't figure it out.

In VisualBasic.Net 2003, I've drawn graphics using drawline etc... to a
picturebox. I now want to copy this to the clipboard. I think if I can
convert the image to a bitmap this will work, but I can't figure out how to
do this or to do it more directly. I'd appreciate any help I can get.

Instead of drawing onto the control directly, draw onto a bitmap
('Graphics.FromImage') and then draw this bitmap onto the picturebox.
Then you can copy the bitmap to the clipboard.
 
I don't know who you are or why you responded so quickly, but I am very
grateful to you. I got this all to work around 11:30 p.m. last night.
It did cause a performance hit... but not much of one... I can live with
it.

Thanks again!
 
Back
Top