You should be able to set references to the Kodak Image Admin Control, Edit
Control, Thumbnail Control , and Scan Control. Below is a sample code I
have used to scan, display and save new images. The parts that would
probably be of the most interest to you would be the setting of variables
and specification of controls at the beginning and the imgEdit.Display at
the end.
Public Function basScan(pgOpt As Integer)
Dim img As Object, imgEdit As Control, imgScan As Control, filename As
String
Dim imgThumb As Control, imgType As String
' set edit and thumbnail controls
Set imgEdit = ImgEdit1
Set imgThumb = imgThumb1
' set scan control
Set imgScan = ctrlScan
' link scan to image
imgScan.DestImageControl = "imgEdit1"
' ScanTo Property - use 2 (write w/o display )
' else have problem with overwrite of existing file
imgScan.ScanTo = 2
Select Case optDocType
Case 1
filename = CertPath() & "C" & txtFileno & ".tif"
imgType = "tif"
Case 2
etc.
End Select
If imgType = "tif" Then
' file type is Tiff
imgScan.FileType = 1
' Set PageType to b&w
imgScan.PageType = 1
'set compression
imgScan.CompressionType = 3 'Huffman
imgScan.CompressionInfo = 16
' Allow multi-page doc
If pgOpt = 1 Then 'new file
imgScan.PageCount = txtPageCount
If txtPageCount > 1 Then
imgScan.MultiPage = True
Else
imgScan.MultiPage = False
End If
Else 'if add page
imgScan.MultiPage = True
imgScan.PageCount = imgEdit.PageCount + 1
End If
Else
' file type is tiff - compression is JPEG
imgScan.FileType = 1
' Set PageType to RGB, 24-bit
imgScan.PageType = 6
'set compression - EasyPhoto probably overrides
imgScan.CompressionType = 6 'JPEG
imgScan.CompressionInfo = 512 'medium compression, high
quality
imgScan.MultiPage = False
End If
' Checks to see if any TWAIN-compatible software is available.
'Object.ScannerAvailable
'1 - Create a new image file and adds image pages; prompt for overwrite
'2 - Add page to existing file
imgScan.PageOption = pgOpt
' zoom ratio for scan
imgScan.Zoom = 100
imgScan.Image = filename
' start scan
imgScan.StartScan
' save file
imgEdit.Image = filename
imgEdit.Display ' must display to save
imgEdit.SaveAs filename
txtPageCount = imgEdit.PageCount
imgThumb.Image = filename
End Function
HTH
--
Allan Thompson
APT Associates/ FieldScope LLC
MS Office Automation / Measurement and Reporting Systems
www.fieldscope.com
860.242.4184