Printer Scaling

02-10-2005, 10:03 PM
I'm using the code below to send an image to the printer. The image is stretched to the page and I want it to fit to the width to scale.

I've tried using a picturebox, but I was getting to screwy results as well.
Public Sub PrintDocImage(ByRef imgImage As Image)
On Error GoTo printerror
Call Printer.PaintPicture(imgImage.Picture, 0, 0, Printer.ScaleWidth, Printer.ScaleHeight, _
0, 0, imgImage.width, imgImage.height, vbSrcCopy)
Call Printer.EndDoc
On Error GoTo 0
Exit Sub
gResponse = MsgBox("Could Not Print Image" & vbTab, vbOKOnly + vbCritical, "ciDocImage Error")
End Sub
Stretch property is set to false on the image control.

02-10-2005, 11:16 PM
Nevermind, found souliton here (
Thanks to OberCanober

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum