-
I would like to add a feature into an application I have created that would print graphics (mostly jpg's) to the default printer. I would like (though it's not neccessary) to be able to resize the graphic so it is centered and a specific size that the user specifies. Is there any way to do this?
As always, Thanks in advance!
TheLeeMan
-
you can use the paintpicture method of a form or picturebox to print it.
e.g
form1.PaintPicture printer, x1, y1, width1, height1, x2, y2, width2, height2, opcode
change the destination size too flip or stretch/shrink the picture (x2,y2)
when you have painted all your pictures to the printer
use
Printer.EndDoc
to print your page
-
(Thanks NeilAvent)
Just for future refrence and for others who view the post, the correct syntax would be as follows (to print image1)
[b]Printer.PaintPicture Image1, 1, 1, Image1.Width, Image1.Height[b]
The height and width can be tweaked to change printed image size and the 1, 1 is the upper left position of the picture on the page.
TheLeeMan