MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

TwainMBS class

class, Twain, MBS Twain Plugin (Twain), class TwainMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: No, Console & Web: No, Feedback.

Function: The plugin class for scanning with TWAIN compatible scanners.
Notes:
Use is like this:
  • Declare subclass of TwainMBS so you can get events.
  • Create new instance of your subclass and store object in some window/app/module property.
  • For Windows call InstallEvent.
  • To scan, call Acquire method.
  • If driver runs synchronously, a modal window shows and you get back a picture object right away when scanning is done.
  • If driver runs asynchronously, it shows a non modal window and you receive events.
  • In TransferReady event you can call TransferImage method. In example a timer is triggered so this runs in the window.
  • To cleanup, use DisableDS and CloseDS methods.
  • We recommend only to have one instance of the TwainMBS object.

When Xojo or Real Studio is used (32 bit), we can of course only see and use devices with 32 bit drivers.
Once Xojo will be ported to 64bit, we can only talk to 64bit drivers.

For 64-bit on Windows you can find 64-bit TwainDSM.dll here:
https://sourceforge.net/projects/twain-dsm/

This class has no sub classes.

Some examples which use this class:


The items on this page are in the following plugins: MBS Twain Plugin.


TwainImageLayoutMBS   -   TwainVersionMBS




Links
MBS Xojo blog