How to make the User Interface close automatically after scanning?

When you acquire images with the User Interface (UI), the UI does not close automatically after all the transfers end. To close the User Interface automatically, please refer to the

1. You can use the IfDisableSourceAfterAcquire property to disable the data source after all the transfers end.

Method 1:

Use ICAP_ROTATION to rotate images. For information about this capability, please click here. also, you can refer to the sample code below to get more information on how to use the capability.

Javascript Code

function btnScan() 
  {
    DWObject.SelectSource();
    DWObject.OpenSource();
    DWObject.IfShowUI = true;
   
    DWObject.IfDisableSourceAfterAcquire = true;
    //disable the data source after transfers end
   
    DWObject.AcquireImage();
  }

2. You can use the DisableSource method in the OnPostTransfer event or the CloseSource method in the OnPostAllTransfers event to disable the source.

Javascript Code

DWObject.RegisterEvent("OnPostTransfer", onPostTransfer);
    // The OnPostTransfer event will be triggered after each transfer ends.
    function OnPostTransfer()
  {
    DWObject.DisableSource();
    //disable source
  }

Reference:

IfDisableSourceAfterAcquire
DisableSource
OnPostTransfer
CloseSource
OnPostAllTransfers

Is this page helpful?

Leave a Reply

Your email address will not be published.