×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Print a TIFF image

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

RE: Print a TIFF image

Not sure if this helps (or works), but Windows comes with Imaging.
Maybe you could load the TIFF file into Imaging and then print it from there.

RE: Print a TIFF image

Visual basic 6 doesn't support “*.tif” files.
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close