|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Twain||MBS Picture Plugin||12.3||Yes||Yes||No||No||No|
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:
- 5 events
- event CloseRequest
- event TransferEnded(pic as picture, ImageInfo as TwainImageInfoMBS, sliced as boolean, layout as TwainImageLayoutMBS)
- event TransferProgress(percent as Double, dataRead as Int64, DataSize as Int64, ImageInfo as TwainImageInfoMBS, NewDataSize as Integer, NewData as Memoryblock, NewPicture as Picture, layout as TwainImageLayoutMBS, Columns as Integer, Rows as Integer, XOffset as Integer, YOffset as Integer)
- event TransferReady
- event TransferStarted(DataSize as Int64, ImageInfo as TwainImageInfoMBS, layout as TwainImageLayoutMBS) as boolean
- 24 properties
- property AutoFeed as Integer
- property AutomaticBorderDetection as Integer
- property AutomaticBrightness as Integer
- property AutomaticRotate as Integer
- property Brightness as Double
- property ConditionCode as Integer
- property Contrast as Double
- property DiscardBlankPages as Integer
- property Duplex as Integer
- property FeederEnabled as Integer
- property Gamma as Double
- property Highlight as Double
- property Lasterror as Integer
- property Orientation as Integer
- property Parent as Window
- property PendingTransferCount as Integer
- property PixelType as Integer
- property ProvideSliceData as Boolean
- property ProvideSlicePicture as Boolean
- property ResX as Double
- property ResY as Double
- property Shadow as Double
- property DefaultDevice as TwainIdentityMBS
- property Imagelayout as TwainImageLayoutMBS
- 28 methods
- method Acquire(modal as boolean = false, showUI as boolean = true) as picture
- method AllDevices as TwainIdentityMBS()
- method AppIdentity as TwainIdentityMBS
- method CanBW as boolean
- method CanGray as boolean
- method CanPalette as boolean
- method CanRGB as boolean
- method CloseDS
- method CloseDSM
- method Constructor(Country as Integer, Language as Integer)
- method DisableDS
- method DontUnload
- method DSIdentity as TwainIdentityMBS
- method GetEnumerationCapability(ID as Integer, byref ItemType as Integer, byref Count as Integer, byref CurrentIndex as Integer, byref DefaultIndex as Integer) as Integer()
- method GetIntegerCapability(ID as Integer, byref Type as Integer) as Integer
- method ImageInfo as TwainImageInfoMBS
- method IsDSEnabled as boolean
- method OpenDS
- method OpenDSM
- method ProcessEvents
- method SelectDS
- method SelectDS(device as TwainIdentityMBS)
- method SetBoolCapability(ID as Integer, Value as Boolean)
- method SetFloatCapability(ID as Integer, Value as Double)
- method SetInt32Capability(ID as Integer, Value as Int32)
- method SetUInt16Capability(ID as Integer, Value as UInt16)
- method SupportsMemoryTransfer as boolean
- method TransferImage as picture
- 387 constants
This class has no sub classes.
Some examples which use this class:
The items on this page are in the following plugins: MBS Picture Plugin.
MBS Xojo tutorial videos