1. Frank Turro
  2. PowerBuilder
  3. Friday, 16 September 2022 13:12 PM UTC

We are using EZTwain Pro 4 to interface with scanners connected directly to users desktops. Immediately after calling the scan function

li_rtn = TWAIN_AcquireMultipageFile(0, ls_fullfilename)

the application resizes itself, the title bar is partially hidden, datawindow positions are moved, etc.

The document is scanned in successfully and we get a zero (successful) return code.

This seems to only happen on desktops where the user has their windows display setting set at 125%.  If it's 100%, everything works fine.

Also, it only happens on the compiled version of the application. If we run it from the PB IDE, or through degug, we don't get the issue.

The following is the code we are executing:

TWAIN_ResetAll()
TWAIN_SetHideUI(TRUE)

TWAIN_SetFileAppendFlag(FALSE)
TWAIN_SetJpegQuality(75)
TWAIN_SetStopOnEmpty(TRUE)

TWAIN_AcquireMultipageFile(0, ls_fullfilename)

IF TWAIN_LastErrorCode()<>0 THEN
    TWAIN_ReportLastError("Unable to scan.")
    RETURN -1
END IF

We are developing in PB2021 Standard Edition (Build 1509).

Has anyone else experienced a similar problem? Is there a solution or work-around?

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 16 September 2022 16:12 PM UTC
  2. PowerBuilder
  3. # 1

Hi Frank;

   Just a thought .. try putting a Window.SetRedraw ( FALSE) before the TWAIN code and then a Window.SetRedraw ( TRUE ) after all the TWAIN code completes. HTH

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.