VintaSoft Twain ActiveX Discussions

Questions, comments and suggestions concerning VintaSoft Twain ActiveX.

Board index < VintaSoft Twain < VintaSoft Twain ActiveX Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Image File Does Not Save in Ms Access Evaluation Version



Image File Does Not Save in Ms Access Evaluation Version

Post by papic1972 »

Hello!

I have downloaded the evaluation version of Active X & have trialled the Ms Access demo.
The image file (which is scanned in b&w) does not preview to Image1 and does not save to disk. Is there any reason for this?

This is the code:
Private Sub VSTwain1_PostScan(ByVal flag As Long)
     If flag <> 0 Then
        If VSTwain1.ErrorCode <> 0 Then
            MsgBox VSTwain1.ErrorString
        End If
     Else
        Set Image1.Picture = VSTwain1.GetCurrentImage
        VSTwain1.TiffCompression = 10
        VSTwain1.SaveImage 0, "c:\test.tif"
     End If
  End Sub
and this piece of code on the Acquire button:
Private Sub BAcquire_Click(Cancel As Integer)
    With VSTwain1
        .StartDevice
        If .SelectSource = 1 Then
            .AutoCleanBuffer = 1
            .MaxImages = 1
            .ShowUI = 0
            .Acquire
        End If
    End With
End Sub
Can anyone please help as I would like to purchase a licence & start using this product immediately?


Re: Image File Does Not Save in Ms Access Evaluation Version

Post by papic1972 »

This works:
If flag <> 0 Then
   If VSTwain1.ErrorCode <> 0 Then
      MsgBox VSTwain1.ErrorString
   End If
Else
   If flag <> 0 Then
      If VSTwain1.ErrorCode <> 0 Then
         MsgBox VSTwain1.ErrorString
      End If
   Else
      'Set Image1.Picture = VSTwain1.GetCurrentImage
      VSTwain1.TiffCompression = 10
      If (VSTwain1.SaveImage(0, "c:\test\test.tif") = 1) Then
         MsgBox VSTwain1.ErrorString
      End If
   End If
End If


Page 1 from 1: 1