zSynopsis
zSynopsis

Reputation: 4854

Print Bitmap in Visual Basic 6

I needed to print a .bmp file to a printer using Visual Basic 6. Does anyone know how i can do this using the Printer.Print method?

Thanks

Upvotes: 0

Views: 12350

Answers (1)

user65628
user65628

Reputation:

You have to use the PaintPicture method of the printer object. Example:

Printer.PaintPicture LoadPicture(filename), xPosition, yPosition, _
                                    [Width], [Height]

If you already have a picture loaded in a Image or Picture control, you can pass the Picture reference of the object instead of using LoadPicture a second time. Note that this method does not automatically resize the image to fit on the paper, you will have to figure out how much to scale the image yourself.

Edit - More information on using the PaintPicture Method

Upvotes: 2

Related Questions