Print contents of picturebox

  • Thread starter Thread starter Christie
  • Start date Start date
C

Christie

In my application, lines (shapes such as circles) and text are drawn in
a picturebox. I am struggling to find a way to print the text and
shapes. There is no images in the picturebox. Could someone please
show me the way.

I am using Visual Studio 2005 (VB.Net)
Operating System: XP Pro

Thanks
 
If you are drawing to a PictureBox as you state, you can access the
PictureBox's image via its Image property:

Dim theImage As Image = PictureBox1.Image
 
Mike McIntyre said:
If you are drawing to a PictureBox as you state, you can access the
PictureBox's image via its Image property:

Dim theImage As Image = PictureBox1.Image

This will only work if you assigned the image to the picturebox previously,
but it will fail if you painted onto the picturebox in its 'Paint' event
handler, for example.
 
Back
Top