Solved

viewing multipage TIFs in VB6 ActiveX control

Posted on 2003-10-30
11
1,022 Views
Last Modified: 2012-05-04
I need to be able to view multipage TIF documents using a Vb ActiveX control.  I tried the 'preview' control in Vb6, but I cannot figure out how to navigate between pages.  ideas?
0
Comment
Question by:jasonlassen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
11 Comments
 
LVL 11

Expert Comment

by:dbrckovi
ID: 9655830
Try using Kodak's imaging controls.

ImgEdit, and ImgThumbnail are the controls that you need.
ImgEdit is used to display and/or edit a single page of a certain TIF, and ImgThumbnail is used to display all of the pages in a single TIF.

 Here are some examples:

To display a TIF inside a thumbnail control, use:       >>  ImgThumbnail1.Image = "E:\temp\picture.tif"  <<          This will display thumbnails of all the pages in that TIF

To display it in full size inside a ImgEdit:      

    ImgEdit1.Image = "E:\temp\picture.tif"     'Load a TIF    
    ImgEdit1.Page = 3                                  'Set which page to display
    ImgEdit1.FitTo 0, True                            'Autofit
    ImgEdit1.Display                                     'Display

Thieese controls can display some other formats as well, but are designed for TIF, and should be already installed on your machine.
If you can't locate them, their file names are:      ImgEdit.ocx   and     ImgThumb.ocx



0
 
LVL 11

Expert Comment

by:dbrckovi
ID: 9655881
I forgot:

Use       >>    ImgEdit1.SelectionRectangle = False     <<     to turn off the Selection Rectangle if you don't need it.

Here are some useful methods, and properties for managing images:

ImgEdit1.Zoom = 100           'Set the zoom percentage
ImgEdit1.PrintImage             'Send image to printer
ImgEdit1.ScrollImage           'If image is bigger than the control window that is displaying it then use this to scroll image
ImgEdit1.Flip                       'Rotate 180 deg.
ImgEdit1.RotateRight            'Rotate 90 deg.
ImgEdit1.RotateLeft              'Rotate 270 deg.
0
 
LVL 2

Author Comment

by:jasonlassen
ID: 9658512
Thanks for the help, but those files do not exist on my machine.  I am running XP Pro and have VB6 installed.  
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 11

Expert Comment

by:dbrckovi
ID: 9669023
XP doesn't provide theese controls, and I think they don't work on XP.

Sorry, but I can't help you further. I never used any other controls.
0
 
LVL 2

Author Comment

by:jasonlassen
ID: 9675797
Thanks anyway for the help.
Any other ideas out there?
0
 
LVL 11

Expert Comment

by:dbrckovi
ID: 10163500
Hi again.

If you are still interested in imgedit.ocx, then there is a way to make it work under WinXP. I just found that out recently.

Copy theese files to your System32 folder:

IMGADMIN.OCX
IMGCMN.DLL
IMGEDIT.OCX
IMGHELP.HLP
IMGMGT.CHM
IMGMGT.HLP
IMGSCAN.OCX
IMGSHL.DLL
IMGTASKS.CHM
IMGTHUMB.OCX
IMGVIEW.CHM
JPEG1X32.DLL
JPEG2X32.DLL
KODAKIMG.EXE
KODAKPRV.EXE
OIENG400.DLL
OIPRT400.DLL
OISLB400.DLL
OISSQ400.DLL
OITWA400.DLL
OIUI400.DLL
TIFFLT.DLL
XIFFR3_0.DLL

Then Start -> Run:      Regsvr32 imgedit.ocx

This should enable Image Edit control in Project/Properties
0
 
LVL 2

Author Comment

by:jasonlassen
ID: 10207123
#1 - where do I get these files?
#2 - will this allow me to view multi-page tiff files without the editing capabilities?  (I don't want to edit, I only want to view.  It sounds as if this has something to do with editing - imgEDIT.ocx?)
Thanks again!
0
 
LVL 11

Accepted Solution

by:
dbrckovi earned 50 total points
ID: 10207807
1)
According to author of that list, theese files can be found on any older Windows version. I'm not sure about others but I have found them all on Win2000 Professional.
I haven't tried to find them on the internet either. I'd put them on my homepage for you to download, but I'm not sure if this is legal, so I won't.

P.S. Don't worry, theese files won't corrupt your Win XP as long as you don't overwrite the files that you already have ( if you have )

2)
Control's name is Image Edit, but you don't have to use the editting functions. Editting functions are not active by default, so this shouldn't bother you at all, but they are there if you ever need them.

If you realy don't want the editting capability then you have another control, ImgThumb.Ocx. It also comes in the package. It is used for displaying thumbnails of the images that are in a multi-page tifs, but it is not very flexible or usefull on it's own. It is more usefull when combined with Image Edit control as an preview tool, where user selects a page of a multi-page TIF, and then the Image Edit control which displays the page in full size, and provides all functions ( zoom, rotate, sliding, Auto Fit, Printing, Editing etc.)

Hope this helps. If you make it work, and need some help on using theese controls, just ask. I have one or more sample projects to give you if you want.
0
 
LVL 11

Expert Comment

by:dbrckovi
ID: 10448472
Thanks!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month5 days, 16 hours left to enroll

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question