Results 1 to 3 of 3

Thread: Graphics - > Printer Object

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Richmond, Virginia
    Posts
    41

    Post

    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

  2. #2
    Member
    Join Date
    Sep 1999
    Location
    Gloucester, UK
    Posts
    33
    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

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Richmond, Virginia
    Posts
    41
    (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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width