-1

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

7
Contributors
7
Replies
11
Views
11 Years
Discussion Span
Last Post by arronlee
0

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.

0

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

0

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

0

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

0

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.

0

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.

-1

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

Edited by peter_budo: Do not post any affiliate links or links to off-site ecommerce sites or auctions

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.