Print a TIFF image
Print a TIFF image
(OP)
Hi everyone,
How can I print a TIFF file using VB6.0?
Any help will be apreciated.
Regards,
MHendler
How can I print a TIFF file using VB6.0?
Any help will be apreciated.
Regards,
MHendler
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: Print a TIFF image
Maybe you could load the TIFF file into Imaging and then print it from there.
RE: Print a TIFF image
Visual basic 6 loads pictures in image or picture box controls.
And loads only pictures with the: “*.bmp”, “*.cur”, “*.dib”,“*.emf”, “*.gif”,“*.ico”, “*.jpg” or “*.wmf” extensions.
You have to change extension from “*.tif” to for example “*.bmp” (how to do that: open “*.tif” file with “Paint” and Save As like “*.bmp” file) and then put into your VB project:
For example:
1. ImgMyPicture.Picture = LoadPicture(App.Path & "\OnePicture.bmp")
‘one way
2. Or in design mode, load the picture, in image or picture box
controls, in their properties. - other way
For printing image files VB6 uses Printer object and
PaintPicture method for example:
Sub PrintPictires()
Dim c As Control
For Each c In Controls
If TypeOf c Is Image Then
Printer.CurrentX = c.Left
Printer.CurrentY = c.Top
Printer.PaintPicture c.Picture, c.Left, c.Top
End If
If TypeOf c Is PictureBox Then
Printer.CurrentX = c.Left
Printer.CurrentY = c.Top
c.AutoSize = True
c.Refresh
c.AutoSize = False
Printer.PaintPicture c.Picture, c.Left, c.Top
End If
Next c
Printer.EndDoc
End Sub
Maybe this will help you.