Printing the contents of a picturebox 
Author Message
 Printing the contents of a picturebox

I want to print the contents of a picturebox, which contains different
pictures at different times. I want the printout to be a proportionally
scaled version of the picture (scaled to fit).

I tried the following code, which I found in a recent posting here:

Printer.PaintPicture picPrintMe.Picture, 0, 0, Printer.ScaleWidth,
Printer.ScaleHeight * 0.6

Printer.NewPage
Printer.EndDoc

I didnt use the [* 0.6], but otherwise I only changed the name of the
picturebox. What happens is that our Netware-worked HP LaserJet 4/4M
prints the cover page, and then takes a very long time, before it finally
give "Error 40" message.

Anyone got a clue?

   Sverre



Tue, 17 Aug 1999 03:00:00 GMT  
 Printing the contents of a picturebox

Quote:

> I want to print the contents of a picturebox, which contains different
> pictures at different times. I want the printout to be a proportionally
> scaled version of the picture (scaled to fit).

> I tried the following code, which I found in a recent posting here:

> Printer.PaintPicture picPrintMe.Picture, 0, 0, Printer.ScaleWidth,
> Printer.ScaleHeight * 0.6

> Printer.NewPage
> Printer.EndDoc

> I didnt use the [* 0.6], but otherwise I only changed the name of the
> picturebox. What happens is that our Netware-worked HP LaserJet 4/4M
> prints the cover page, and then takes a very long time, before it finally
> give "Error 40" message.

> Anyone got a clue?

>    Sverre

Error 40 indicates a data error - parity, framing, or line overrun -
during the reception of data from the computer.  It may also indicate an
incorrect configuration (or baud rate, if a serial connection is used).

I would suspect something in the printer setup (on the originating PC)
or in the passing of binary data from that PC to the printer.  If there
is a printr server that spools the print jobs for the printer, you must
go through the server.  You must also ensure that the print job begins
with the proper codes to set the printer for the graphics mode needed
for the picture to be printed (should be done automatically by the
Windows print driver, but you must have the correct driver).

--

Visit my favorite school
http://www.mindspring.com/~addison



Tue, 17 Aug 1999 03:00:00 GMT  
 Printing the contents of a picturebox

Quote:


>> I want to print the contents of a picturebox, which contains different
>> pictures at different times. I want the printout to be a proportionally
>> scaled version of the picture (scaled to fit).

>> I tried the following code, which I found in a recent posting here:

>> Printer.PaintPicture picPrintMe.Picture, 0, 0, Printer.ScaleWidth,
>> Printer.ScaleHeight * 0.6

>> Printer.NewPage
>> Printer.EndDoc

>> I didnt use the [* 0.6], but otherwise I only changed the name of the
>> picturebox. What happens is that our Netware-worked HP LaserJet 4/4M
>> prints the cover page, and then takes a very long time, before it finally
>> give "Error 40" message.

>> Anyone got a clue?

>>    Sverre
>Error 40 indicates a data error - parity, framing, or line overrun -
>during the reception of data from the computer.  It may also indicate an
>incorrect configuration (or baud rate, if a serial connection is used).

>I would suspect something in the printer setup (on the originating PC)
>or in the passing of binary data from that PC to the printer.  If there
>is a printr server that spools the print jobs for the printer, you must
>go through the server.  You must also ensure that the print job begins
>with the proper codes to set the printer for the graphics mode needed
>for the picture to be printed (should be done automatically by the
>Windows print driver, but you must have the correct driver).

The printer is on a Netware network,and works with other apps -- like
Word. It just chokes when its about to print the image... I think it may
be that the picture is to big... Is there some way to scale the image to
the correct size?

   Sverre



Fri, 20 Aug 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Print the Contents of a PictureBox

2. Printing ALL content in large PictureBox which has scrollbars

3. Printing bitmaps or picturebox contents

4. print content of picturebox control

5. Printing contents of Picturebox

6. Printing contents of a picturebox

7. Help: printing contents of a picturebox...

8. Print Contents Of PictureBox, how does one?

9. Printing PictureBox and Grid Contents VB3

10. Printing PictureBox Contents?

11. Can't print contents picturebox with printform method

12. Printing entire content of picturebox

 

 
Powered by phpBB® Forum Software