Graphic Printing 
Author Message
 Graphic Printing

I'm using a PictureBox on a form for the surface where the user can move
elements, add elements, connect elements, etc.  Now I want to be able to
print out the contents of the picturebox.  I've tried a couple of
different ways with little to no success.

The PictureBox is drawn to using GDI functions to a temporary hdc and
then copied over using BitBlt.

I've tried to do the same using both BitBlt and StretchBlt but both
result in the printed page being blank.

I've tried doing the drawing straight to the hdc of the printer and that
does work, however the scale is off and I can not seem to adjust it and
some of the objects are filled when they should not be.

If anyone has any ideas how to go about solving this problem please let
me know.

Thanks very much,
Marc Audy
Construction Engineering & Management
University of Alberta



Mon, 21 Jan 2002 03:00:00 GMT  
 Graphic Printing
Hi Marc,

When you draw to/from PictureBox via APIs use the hDC supplied by the
hDC property of the Picture box.

In other words do not use GetDC(PictureBox.hWnd) to obtain a hDC.

Regards,
          Stoil

Quote:

> I'm using a PictureBox on a form for the surface where the user can move
> elements, add elements, connect elements, etc.  Now I want to be able to
> print out the contents of the picturebox.  I've tried a couple of
> different ways with little to no success.

> The PictureBox is drawn to using GDI functions to a temporary hdc and
> then copied over using BitBlt.

> I've tried to do the same using both BitBlt and StretchBlt but both
> result in the printed page being blank.

> I've tried doing the drawing straight to the hdc of the printer and that
> does work, however the scale is off and I can not seem to adjust it and
> some of the objects are filled when they should not be.

> If anyone has any ideas how to go about solving this problem please let
> me know.

> Thanks very much,
> Marc Audy
> Construction Engineering & Management
> University of Alberta



Mon, 21 Jan 2002 03:00:00 GMT  
 Graphic Printing
Marc,
I have a collection of VB5 Print routines that do just what you want. If you
like, I can e-mail them to you. Just let me know.

Amos Peace

Quote:

> I'm using a PictureBox on a form for the surface where the user can move
> elements, add elements, connect elements, etc.  Now I want to be able to
> print out the contents of the picturebox.  I've tried a couple of
> different ways with little to no success.

> The PictureBox is drawn to using GDI functions to a temporary hdc and
> then copied over using BitBlt.

> I've tried to do the same using both BitBlt and StretchBlt but both
> result in the printed page being blank.

> I've tried doing the drawing straight to the hdc of the printer and that
> does work, however the scale is off and I can not seem to adjust it and
> some of the objects are filled when they should not be.

> If anyone has any ideas how to go about solving this problem please let
> me know.

> Thanks very much,
> Marc Audy
> Construction Engineering & Management
> University of Alberta



Mon, 21 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. graphics printing as black boxes

2. graphics printing as black boxes

3. graphics printing as black boxes

4. URGENT!!!Graphics Printing Problems

5. Graphics Printing WWW pages

6. The fastest graphic print ?

7. Graphic Printing?

8. Graphics Printing

9. I need QBasic graphics printing routines....####

10. QBasic graphics printing routines.

11. VB 3 Graphics printing

12. Image & Graphics printing

 

 
Powered by phpBB® Forum Software