•  
  •  
  •  
 

Twain Acquire Problem after cancel....Help!

Last post 18 Sep 2008, 10:51 AM by ssophon. 2 replies.
Sort Posts: Previous Next
  •  16 Sep 2008, 11:18 AM 15649

    Twain Acquire Problem after cancel....Help!

    My VB6 program has a problem when try to acquire the image from ImgxTwain second time after user select cancel the first time. For the first time it works fine and if user select to scan it also works fine second time.

    However, if user click cancel from the scan dialog instead of click scan then the second time the scan dialog box will not show up. It just run thru the code without any error but does not show the scan dialog box neither.

    My ImgX that I am using is version 6.4 and here is the code. Can someone help please. Thanks a lot.

    Option Explicit

    Private WithEvents m_ImgX_Twain         As ImgXTwain

    Private Sub Command1_Click()
        m_ImgX_Twain.Acquire False, Me.hWnd
    End Sub

    Private Sub Form_Load()
        Set m_ImgX_Twain = New ImgXTwain
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
        Set m_ImgX_Twain = Nothing
    End Sub

    Private Sub m_ImgX_Twain_AcquireCanceled()
        MsgBox "Cancelled"
    End Sub

    Private Sub m_ImgX_Twain_AcquireFinished()
        MsgBox "Image Acquire Finished"
    End Sub

    Private Sub m_ImgX_Twain_CanCloseTwain()
        MsgBox "Cancel Close Twain"
    End Sub

    Private Sub m_ImgX_Twain_ImageAcquired(Image As ImgX6.ImgX_Image)
        MsgBox "Image Acquired"
    End Sub

    Private Sub m_ImgX_Twain_TwainError(ByVal erNum As Long, ByVal erSource As String, ByVal Description As String)
        MsgBox "Twain Error"
    End Sub

     

  •  17 Sep 2008, 2:12 PM 15672 in reply to 15649

    Re: Twain Acquire Problem after cancel....Help!

    I'm not able to reproduce this problem.  Is this a WIA driver or a TWAIN driver?  The last release of ImgX (6.4.13) fixed an issue with canceling a WIA driver dialog, so you might want to make sure you have the last version.
  •  18 Sep 2008, 10:51 AM 15695 in reply to 15672

    Re: Twain Acquire Problem after cancel....Help!

    My version is 6.4.0.12 I downloaded the latest vesion and the problem is gone now. Thank you.
View as RSS news feed in XML