Hi Guys/Gals,

I am trying to print a tiff image using vb6, any Idea how to do this by using somekind of print function and calling the tiff file that needs to be printed. EG: I have 101.tiff saved in c:\Scans, and I need vb code to send this to the printer by clicking a button on my form. Any help would be deeply appreciated. Thanks

MuthuIVS

Recommended Answers

All 7 Replies

you could use a picture box, and then load the picture with:

picture1.Picture = LoadPicture("c:\scans\101.tiff")

Then you have to get a little more complicated, and do something with the printer... so you can say:

const twipfactor = 1440
picture1.autoredraw = false
printer.paintpicture picture1.picture, 1400, 2040

Ok, paintpicture accepts the picture, and the upper left coordinate of where on the page to start printing.... you can also specify other options, such as hight and width of the picture, but for now, that should work.

Everytime i try to load a tiff file into the picbox, I am getting an INVALID PICTURE error. I try it with another bitmap file, and it works.

Also what if I have a multi page tiff file in the system, how would those be printed?

Thanks in advance.

MuthuIVS

Hi. I'm new here, but struggling with the same problem - how to handle TIFFs in VB6. Has anyone come up with an answer?
How about some code to convert a TIFF to BMP or JPG? Anyone out there got any ideas?
Cheers
Stickerman

Use Imageman VB ActiveX component (that costs around $500.) add that to VB project reference.

'sample code

Dim myimagecontrol As IMActX8.ImageControl

Set myimagecontrol = New IMActX8.ImageControl


myimagecontrol.Picture = Trim(C:\images\sample.tif)

Call myimagecontrol.ScaleImage(500, 500)

Picture1.Picture = myimagecontrol.VBPicture

' Picture1 is VB picturebox.

this is how I am displaying tif images in VB

Hi!

I'm trying to print my tiff files and put page number on it.
Just want to ask, if it is possible to do this in Microsoft excel using macro codes or in visual basic?

You can also send response in my email add: histrionics_2007@yahoo.com.ph

Thank you.

Hi!

I'm trying to print my tiff files and put page number on it.
Just want to ask, if it is possible to do this in Microsoft excel using macro codes or in visual basic?

You can also send response in my email add: histrionics_2007@yahoo.com.ph

Thank you.

have you tried Windows Image Acquisition 2.0 (WIA 2.0).
It works great for me and I guess it is the one you need.
Best of all, it is free.

I wonder whether a [Tiff printing driver]<URL SNIPED> is necessary or not?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.