Picturebox graphic to clipboard

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.
 
H

Herfried K. Wagner [MVP]

* "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.
 
C

Cook Raymond

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top