Click here to Skip to main content
15,886,110 members
Articles / Programming Languages / C#
Article

.NET TWAIN image scanner

Rate me:
Please Sign up or sign in to vote.
4.91/5 (227 votes)
12 May 2002Public Domain2 min read 7.2M   132.2K   421   996
Using TWAIN API to scan images

Sample Screenshot

Abstract

In Windows imaging applications, the most used API for scanning is TWAIN www.twain.org. Unfortunately, the new .NET Framework has no built-in support for TWAIN. So we have to work with the interop methods of .NET to access this API. This article doesn't explain this interop techniques, and good knowledge of the TWAIN 1.9 specifications is assumed! The sample code included doesn't present a finished library, only some essential steps for a minimal TWAIN adaption to .NET applications.

Details

First step was to port the most important parts of TWAIN.H, these are found in TwainDefs.cs. The real logic for calling TWAIN is coded in the class Twain, in file TwainLib.cs.. As the TWAIN API is exposed by the Windows DLL, twain_32.dll, we have to use the .NET DllImport mechanism for interop with legacy code. This DLL has the central DSM_Entry(), ordinal #1 function exported as the entry point to TWAIN. This call has numerous parameters, and the last one is of variable type! It was found to be best if we declare multiple variants of the call like:

C#
[DllImport("twain_32.dll", EntryPoint="#1")]
private static extern TwRC DSMparent(
    [In, Out] TwIdentity origin,
    IntPtr zeroptr,
    TwDG dg, TwDAT dat, TwMSG msg,
    ref IntPtr refptr );

The Twain class has a simple 5-step interface:

C#
class Twain
{
    Init();
    Select();
    Acquire();
    PassMessage();
    TransferPictures();
}

For some sort of 'callbacks', TWAIN uses special Windows messages, and these must be caught from the application-message-loop. In .NET, the only way found was IMessageFilter.PreFilterMessage(), and this filter has to be activated with a call like Application.AddMessageFilter(). Within the filter method, we have to forward each message to Twain.PassMessage(), and we get a hint (enum TwainCommand) back for how we have to react.

Sample App

The sample is a Windows Forms MDI-style application. It has the two TWAIN-related menu items Select Source... and Acquire... Once an image is scanned in, we can save it to a file in any of the GDI+ supported file formats (BMP, GIF, TIFF, JPEG...)

Limitations

All code was only tested on Windows 2000SP2, with an Epson Perfection USB scanner and an Olympus digital photo camera. The scanned picture is (by TWAIN spec) a Windows DIB, and the sample code has VERY little checking against error return codes and bitmap formats. Unfortunately, no direct method is available in .NET to convert a DIB to the managed Bitmap class... Some known problems may show up with color palettes and menus.

Note, TWAIN has it's root in 16-Bit Windows! For a more modern API supported on Windows ME/XP, have a look at Windows Image Acquisition (WIA).

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Web Developer
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionVS2008 and Vista 64 bit Pin
nxtwothou5-May-08 7:41
nxtwothou5-May-08 7:41 
AnswerRe: VS2008 and Vista 64 bit Pin
nxtwothou5-May-08 9:51
nxtwothou5-May-08 9:51 
Questionhow to configure this lib(setting color,size,resolution???) Pin
salihovic22-Apr-08 1:02
salihovic22-Apr-08 1:02 
QuestionHow to set output size using twain capabilities? Pin
kantaiah13-Apr-08 19:14
kantaiah13-Apr-08 19:14 
QuestionThis example doesn't work on VS2008 Pin
Ming_Z26-Feb-08 17:16
Ming_Z26-Feb-08 17:16 
AnswerRe: This example doesn't work on VS2008 Pin
Topper Price11-Jul-08 8:57
Topper Price11-Jul-08 8:57 
GeneralRe: This example doesn't work on VS2008 Pin
Ming_Z11-Jul-08 9:48
Ming_Z11-Jul-08 9:48 
GeneralScanner problem Pin
piras10-Feb-08 7:35
piras10-Feb-08 7:35 
i've a scanner EPSON3170 USB, but if acquire the application is stopped:

<stathread()> Shared Sub Main()
If (Twain.ScreenBitDepth < 15) Then
MessageBox.Show("Need high/true-color video mode!", "Screen Bit Depth", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If

Dim mf As MainFrame = New MainFrame()
---> Application.Run(mf)
End Sub

Thanks
M.Parro


- mf {TwainGUI.vb.TwainGui.MainFrame} TwainGUI.vb.TwainGui.MainFrame
__identity Nothing Object
AcceptButton error: cannot obtain value System.Windows.Forms.IButtonControl
AccessibilityObject error: cannot obtain value System.Windows.Forms.AccessibleObject
AccessibleDefaultActionDescription error: cannot obtain value String
AccessibleDescription error: cannot obtain value String
AccessibleName error: cannot obtain value String
AccessibleRole error: cannot obtain value System.Windows.Forms.AccessibleRole
Active error: cannot obtain value Boolean
activeControl Nothing System.Windows.Forms.Control
ActiveControl error: cannot obtain value System.Windows.Forms.Control
ActiveForm error: cannot obtain value System.Windows.Forms.Form
ActiveMdiChild error: cannot obtain value System.Windows.Forms.Form
ActiveMdiChildInternal error: cannot obtain value System.Windows.Forms.Form
ActiveXAmbientBackColor error: cannot obtain value System.Drawing.Color
ActiveXAmbientFont error: cannot obtain value System.Drawing.Font
ActiveXAmbientForeColor error: cannot obtain value System.Drawing.Color
ActiveXEventsFrozen error: cannot obtain value Boolean
ActiveXHWNDParent error: cannot obtain value System.IntPtr
ActiveXInstance error: cannot obtain value System.Windows.Forms.Control.ActiveXImpl
AllowDrop error: cannot obtain value Boolean
AllowTransparency error: cannot obtain value Boolean
AmbientPropertiesService error: cannot obtain value System.Windows.Forms.AmbientProperties
Anchor error: cannot obtain value System.Windows.Forms.AnchorStyles
AutoScale error: cannot obtain value Boolean
AutoScaleBaseSize error: cannot obtain value System.Drawing.Size
+ autoScaleBaseSize {Width = 5 Height = 13} System.Drawing.Size
+ AutoScaleDimensions {Width = 0.0 Height = 0.0} System.Drawing.SizeF
+ autoScaleDimensions {Width = 0.0 Height = 0.0} System.Drawing.SizeF
AutoScaleFactor error: cannot obtain value System.Drawing.SizeF
AutoScaleMode Inherit {3} System.Windows.Forms.AutoScaleMode
autoScaleMode Inherit {3} System.Windows.Forms.AutoScaleMode
AutoScroll error: cannot obtain value Boolean
AutoScrolling Nothing System.Diagnostics.TraceSwitch
+ AutoScrollMargin {Width = 0 Height = 0} System.Drawing.Size
+ AutoScrollMinSize {Width = 0 Height = 0} System.Drawing.Size
AutoScrollOffset error: cannot obtain value System.Drawing.Point
AutoScrollPosition error: cannot obtain value System.Drawing.Point
AutoSize error: cannot obtain value Boolean
AutoSizeMode error: cannot obtain value System.Windows.Forms.AutoSizeMode
AutoValidate error: cannot obtain value System.Windows.Forms.AutoValidate
AutoValidate error: cannot obtain value System.Windows.Forms.AutoValidate
autoValidate Inherit {-1} System.Windows.Forms.AutoValidate
autoValidateChanged Nothing System.EventHandler
BackColor error: cannot obtain value System.Drawing.Color
BackColorBrush error: cannot obtain value System.IntPtr
BackgroundImage error: cannot obtain value System.Drawing.Image
BackgroundImageLayout error: cannot obtain value System.Windows.Forms.ImageLayout
BecomingActiveControl error: cannot obtain value Boolean
BindingContext error: cannot obtain value System.Windows.Forms.BindingContext
BindingContextInternal error: cannot obtain value System.Windows.Forms.BindingContext
Bottom error: cannot obtain value Integer
Bounds error: cannot obtain value System.Drawing.Rectangle
BufferContext error: cannot obtain value System.Drawing.BufferedGraphicsContext
BufferPinkRect Nothing System.Diagnostics.BooleanSwitch
CachedImeMode error: cannot obtain value System.Windows.Forms.ImeMode
+ cachedLayoutEventArgs {System.Windows.Forms.LayoutEventArgs} System.Windows.Forms.LayoutEventArgs
CacheTextInternal error: cannot obtain value Boolean
CalledClosing error: cannot obtain value Boolean
CalledCreateControl error: cannot obtain value Boolean
CalledMakeVisible error: cannot obtain value Boolean
CalledOnLoad error: cannot obtain value Boolean
CanAccessProperties error: cannot obtain value Boolean
CancelButton error: cannot obtain value System.Windows.Forms.IButtonControl
CanEnableIme error: cannot obtain value Boolean
CanFocus error: cannot obtain value Boolean
CanRaiseEvents error: cannot obtain value Boolean
CanRaiseEventsInternal error: cannot obtain value Boolean
CanSelect error: cannot obtain value Boolean
Capture error: cannot obtain value Boolean
CaptureInternal error: cannot obtain value Boolean
CausesValidation error: cannot obtain value Boolean
checkForIllegalCrossThreadCalls True Boolean
CheckForIllegalCrossThreadCalls error: cannot obtain value Boolean
clientHeight 345 Integer
ClientRectangle error: cannot obtain value System.Drawing.Rectangle
ClientSize error: cannot obtain value System.Drawing.Size
clientWidth 600 Integer
CloseReason None {0} System.Windows.Forms.CloseReason
closeReason None {0} System.Windows.Forms.CloseReason
CompanyName error: cannot obtain value String
components Nothing System.ComponentModel.Container
Container error: cannot obtain value System.ComponentModel.IContainer
ContainsFocus error: cannot obtain value Boolean
ContextMenu error: cannot obtain value System.Windows.Forms.ContextMenu
ContextMenuStrip error: cannot obtain value System.Windows.Forms.ContextMenuStrip
ControlBox error: cannot obtain value Boolean
ControlKeyboardRouting Nothing System.Diagnostics.TraceSwitch
Controls error: cannot obtain value System.Windows.Forms.Control.ControlCollection
controlStyle 267011 System.Windows.Forms.ControlStyles
Created error: cannot obtain value Boolean
CreateParams error: cannot obtain value System.Windows.Forms.CreateParams
CreateParams error: cannot obtain value System.Windows.Forms.CreateParams
+ createParams {System.Windows.Forms.CreateParams} System.Windows.Forms.CreateParams
CreateThreadId error: cannot obtain value Integer
+ ctlClient {System.Windows.Forms.MdiClient} System.Windows.Forms.MdiClient
CurrentAutoScaleDimensions error: cannot obtain value System.Drawing.SizeF
+ currentAutoScaleDimensions {Width = 0.0 Height = 0.0} System.Drawing.SizeF
+ currentHelpInfo Nothing System.Windows.Forms.HelpInfo
CurrentImeContextMode error: cannot obtain value System.Windows.Forms.ImeMode
Cursor error: cannot obtain value System.Windows.Forms.Cursor
DataBindings error: cannot obtain value System.Windows.Forms.ControlBindingsCollection
DefaultBackColor error: cannot obtain value System.Drawing.Color
DefaultCursor error: cannot obtain value System.Windows.Forms.Cursor
DefaultFont error: cannot obtain value System.Drawing.Font
+ defaultFont {System.Drawing.Font} System.Drawing.Font
defaultFontHandleWrapper Nothing System.Windows.Forms.Control.FontHandleWrapper
DefaultForeColor error: cannot obtain value System.Drawing.Color
DefaultIcon error: cannot obtain value System.Drawing.Icon
+ defaultIcon {System.Drawing.Icon} System.Drawing.Icon
DefaultImeMode error: cannot obtain value System.Windows.Forms.ImeMode
DefaultMargin error: cannot obtain value System.Windows.Forms.Padding
DefaultMaximumSize error: cannot obtain value System.Drawing.Size
DefaultMinimumSize error: cannot obtain value System.Drawing.Size
DefaultPadding error: cannot obtain value System.Windows.Forms.Padding
DefaultRestrictedIcon error: cannot obtain value System.Drawing.Icon
defaultRestrictedIcon Nothing System.Drawing.Icon
DefaultRightToLeft error: cannot obtain value System.Windows.Forms.RightToLeft
DefaultSize error: cannot obtain value System.Drawing.Size
DesignMode error: cannot obtain value Boolean
DesktopBounds error: cannot obtain value System.Drawing.Rectangle
DesktopLocation error: cannot obtain value System.Drawing.Point
dialogResult None {0} System.Windows.Forms.DialogResult
DialogResult None {0} System.Windows.Forms.DialogResult
DisabledColor error: cannot obtain value System.Drawing.Color
DisableImeModeChangedCount error: cannot obtain value Integer
+ displayRect {X = 0 Y = 0 Width = 600 Height = 365} System.Drawing.Rectangle
DisplayRectangle error: cannot obtain value System.Drawing.Rectangle
Disposing error: cannot obtain value Boolean
Dock error: cannot obtain value System.Windows.Forms.DockStyle
DockPadding error: cannot obtain value System.Windows.Forms.ScrollableControl.DockPaddingEdges
dockPadding Nothing System.Windows.Forms.ScrollableControl.DockPaddingEdges
DoubleBuffered error: cannot obtain value Boolean
DoubleBufferingEnabled error: cannot obtain value Boolean
Enabled error: cannot obtain value Boolean
EVENT_ACTIVATED {Object} Object
EVENT_CLOSED {Object} Object
EVENT_CLOSING {Object} Object
EVENT_DEACTIVATE {Object} Object
EVENT_FORMCLOSED {Object} Object
EVENT_FORMCLOSING {Object} Object
EVENT_HELPBUTTONCLICKED {Object} Object
EVENT_INPUTLANGCHANGE {Object} Object
EVENT_INPUTLANGCHANGEREQUEST {Object} Object
EVENT_LOAD {Object} Object
EVENT_MAXIMIZEDBOUNDSCHANGED {Object} Object
EVENT_MAXIMUMSIZECHANGED {Object} Object
EVENT_MDI_CHILD_ACTIVATE {Object} Object
EVENT_MENUCOMPLETE {Object} Object
EVENT_MENUSTART {Object} Object
EVENT_MINIMUMSIZECHANGED {Object} Object
EVENT_RESIZEBEGIN {Object} Object
EVENT_RESIZEEND {Object} Object
EVENT_RIGHTTOLEFTLAYOUTCHANGED {Object} Object
EVENT_SCROLL Nothing Object
EVENT_SHOWN {Object} Object
EventAutoSizeChanged {Object} Object
EventBackColor {Object} Object
EventBackgroundImage {Object} Object
EventBackgroundImageLayout {Object} Object
EventBindingContext {Object} Object
EventCausesValidation {Object} Object
EventChangeUICues {Object} Object
EventClick {Object} Object
EventClientSize {Object} Object
EventContextMenu {Object} Object
EventContextMenuStrip {Object} Object
EventControlAdded {Object} Object
EventControlRemoved {Object} Object
EventCursor {Object} Object
EventDisposed Nothing Object
EventDock {Object} Object
EventDoubleClick {Object} Object
EventDragDrop {Object} Object
EventDragEnter {Object} Object
EventDragLeave {Object} Object
EventDragOver {Object} Object
EventEnabled {Object} Object
EventEnabledChanged {Object} Object
EventEnter {Object} Object
EventFont {Object} Object
EventForeColor {Object} Object
EventGiveFeedback {Object} Object
EventGotFocus {Object} Object
EventHandleCreated {Object} Object
EventHandleDestroyed {Object} Object
EventHelpRequested {Object} Object
EventImeModeChanged {Object} Object
EventInvalidated {Object} Object
EventKeyDown {Object} Object
EventKeyPress {Object} Object
EventKeyUp {Object} Object
EventLayout {Object} Object
EventLeave {Object} Object
EventLocation {Object} Object
EventLostFocus {Object} Object
EventMarginChanged {Object} Object
EventMouseCaptureChanged {Object} Object
EventMouseClick {Object} Object
EventMouseDoubleClick {Object} Object
EventMouseDown {Object} Object
EventMouseEnter {Object} Object
EventMouseHover {Object} Object
EventMouseLeave {Object} Object
EventMouseMove {Object} Object
EventMouseUp {Object} Object
EventMouseWheel {Object} Object
EventMove {Object} Object
EventPaddingChanged {Object} Object
EventPaint {Object} Object
EventParent {Object} Object
EventPreviewKeyDown {Object} Object
EventQueryAccessibilityHelp {Object} Object
EventQueryContinueDrag {Object} Object
EventRegionChanged {Object} Object
EventResize {Object} Object
EventRightToLeft {Object} Object
Events error: cannot obtain value System.ComponentModel.EventHandlerList
+ events {System.ComponentModel.EventHandlerList} System.ComponentModel.EventHandlerList
EventSize {Object} Object
EventStyleChanged {Object} Object
EventSystemColorsChanged {Object} Object
EventTabIndex {Object} Object
EventTabStop {Object} Object
EventText {Object} Object
EventValidated {Object} Object
EventValidating {Object} Object
EventVisible {Object} Object
EventVisibleChanged {Object} Object
Focused error: cannot obtain value Boolean
focusedControl Nothing System.Windows.Forms.Control
FocusTracing Nothing System.Diagnostics.TraceSwitch
Font error: cannot obtain value System.Drawing.Font
FontHandle error: cannot obtain value System.IntPtr
FontHeight error: cannot obtain value Integer
fontMeasureString "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" String
ForeColor error: cannot obtain value System.Drawing.Color
FormBorderStyle error: cannot obtain value System.Windows.Forms.FormBorderStyle
FormerlyActiveMdiChild error: cannot obtain value System.Windows.Forms.Form
+ FormPadding {System.Windows.Forms.Padding} System.Windows.Forms.Padding
+ formState {System.Collections.Specialized.BitVector32} System.Collections.Specialized.BitVector32
+ FormStateAllowTransparency {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateAutoScaling {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateBorderStyle {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateControlBox {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ formStateEx {System.Collections.Specialized.BitVector32} System.Collections.Specialized.BitVector32
+ FormStateExAutoSize {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExCalledClosing {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExCalledCreateControl {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExCalledMakeVisible {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExCalledOnLoad {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExInModalSizingLoop {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExInScale {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExInUpdateMdiControlStrip {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExMnemonicProcessed {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExSettingAutoScale {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExShowIcon {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExUpdateMenuHandlesDeferred {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExUpdateMenuHandlesSuspendCount {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExUseMdiChildProc {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExWindowBoundsHeightIsClientSize {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExWindowBoundsWidthIsClientSize {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateExWindowClosing {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateHelpButton {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateIconSet {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateIsActive {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateIsRestrictedWindow {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateIsRestrictedWindowChecked {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateIsTextEmpty {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateIsWindowActivated {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateKeyPreview {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateLayered {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateMaximizeBox {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateMdiChildMax {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateMinimizeBox {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateRenderSizeGrip {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateSetClientSize {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateShowWindowOnCreate {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateSizeGripStyle {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateStartPos {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateSWCalled {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateTaskBar {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateTopMost {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
+ FormStateWindowState {System.Collections.Specialized.BitVector32.Section} System.Collections.Specialized.BitVector32.Section
Handle error: cannot obtain value System.IntPtr
HandleInternal error: cannot obtain value System.IntPtr
HasChildren error: cannot obtain value Boolean
HasMenu error: cannot obtain value Boolean
Height 399 Integer
height 399 Integer
HelpButton error: cannot obtain value Boolean
+ horizontalScroll {System.Windows.Forms.HScrollProperties} System.Windows.Forms.HScrollProperties
HorizontalScroll error: cannot obtain value System.Windows.Forms.HScrollProperties
HostedInWin32DialogManager error: cannot obtain value Boolean
HScroll error: cannot obtain value Boolean
Icon error: cannot obtain value System.Drawing.Icon
icon Nothing System.Drawing.Icon
Identity Nothing Object
ImeCharsToIgnoreDisabled -1 Integer
ImeCharsToIgnoreEnabled 0 Integer
ImeMode error: cannot obtain value System.Windows.Forms.ImeMode
ImeModeInternal error: cannot obtain value System.Windows.Forms.ImeMode
ImeSupported error: cannot obtain value Boolean
ImeWmCharsToIgnore error: cannot obtain value Integer
inCrossThreadSafeCall False Boolean
InnerMostActiveContainerControl error: cannot obtain value System.Windows.Forms.ContainerControl
InnerMostFocusedContainerControl error: cannot obtain value System.Windows.Forms.ContainerControl
InternalHandle error: cannot obtain value System.IntPtr
internalSyncObject {Object} Object
+ invokeMarshaledCallbackHelperDelegate {System.Threading.ContextCallback} System.Threading.ContextCallback
InvokeRequired error: cannot obtain value Boolean
IsAccessible error: cannot obtain value Boolean
IsActiveX error: cannot obtain value Boolean
IsClosing error: cannot obtain value Boolean
IsContainerControl error: cannot obtain value Boolean
IsDisposed error: cannot obtain value Boolean
IsHandleCreated error: cannot obtain value Boolean
IsIEParent error: cannot obtain value Boolean
IsLayoutSuspended error: cannot obtain value Boolean
IsMaximized error: cannot obtain value Boolean
IsMdiChild error: cannot obtain value Boolean
IsMdiChildFocusable error: cannot obtain value Boolean
IsMdiContainer error: cannot obtain value Boolean
IsMirrored error: cannot obtain value Boolean
IsMnemonicsListenerAxSourced error: cannot obtain value Boolean
IsRestrictedWindow error: cannot obtain value Boolean
IsWindowObscured error: cannot obtain value Boolean
KeyPreview error: cannot obtain value Boolean
LastCanEnableIme error: cannot obtain value Boolean
LayoutEngine error: cannot obtain value System.Windows.Forms.Layout.LayoutEngine
layoutSuspendCount 0 Byte
Left 132 Integer
Location error: cannot obtain value System.Drawing.Point
+ mainFrameMenu {System.Windows.Forms.MainMenu} System.Windows.Forms.MainMenu
MainMenuStrip error: cannot obtain value System.Windows.Forms.MenuStrip
Margin error: cannot obtain value System.Windows.Forms.Padding
MaximizeBox error: cannot obtain value Boolean
MaximizedBounds error: cannot obtain value System.Drawing.Rectangle
MaximumSize error: cannot obtain value System.Drawing.Size
MdiChildren error: cannot obtain value System.Windows.Forms.Form()
+ MdiClient {System.Windows.Forms.MdiClient} System.Windows.Forms.MdiClient
+ mdiClient1 {System.Windows.Forms.MdiClient} System.Windows.Forms.MdiClient
MdiControlStrip error: cannot obtain value System.Windows.Forms.MdiControlStrip
MdiParent error: cannot obtain value System.Windows.Forms.Form
MdiParentInternal error: cannot obtain value System.Windows.Forms.Form
MdiWindowListStrip error: cannot obtain value System.Windows.Forms.MdiWindowListStrip
Menu error: cannot obtain value System.Windows.Forms.MainMenu
+ menuItemExit {System.Windows.Forms.MenuItem} System.Windows.Forms.MenuItem
+ menuItemScan {System.Windows.Forms.MenuItem} System.Windows.Forms.MenuItem
+ menuItemSelSrc {System.Windows.Forms.MenuItem} System.Windows.Forms.MenuItem
+ menuItemSepr {System.Windows.Forms.MenuItem} System.Windows.Forms.MenuItem
+ menuMainFile {System.Windows.Forms.MenuItem} System.Windows.Forms.MenuItem
+ menuMainWindow {System.Windows.Forms.MenuItem} System.Windows.Forms.MenuItem
MergedMenu error: cannot obtain value System.Windows.Forms.MainMenu
MergedMenuPrivate error: cannot obtain value System.Windows.Forms.MainMenu
+ minAutoSize {Width = 0 Height = 0} System.Drawing.Size
MinimizeBox error: cannot obtain value Boolean
MinimumSize error: cannot obtain value System.Drawing.Size
Modal error: cannot obtain value Boolean
ModifierKeys error: cannot obtain value System.Windows.Forms.Keys
MouseButtons error: cannot obtain value System.Windows.Forms.MouseButtons
MousePosition error: cannot obtain value System.Drawing.Point
mouseWheelInit True Boolean
mouseWheelMessage 522 Integer
mouseWheelRoutingNeeded False Boolean
msgfilter True Boolean
Name error: cannot obtain value String
NcAccessibilityObject error: cannot obtain value System.Windows.Forms.AccessibleObject
Opacity error: cannot obtain value Double
OpacityAsByte error: cannot obtain value Byte
originalImeContext 0 System.IntPtr
OwnedForms error: cannot obtain value System.Windows.Forms.Form()
Owner error: cannot obtain value System.Windows.Forms.Form
OwnerInternal error: cannot obtain value System.Windows.Forms.Form
ownerWindow Nothing System.Windows.Forms.NativeWindow
Padding error: cannot obtain value System.Windows.Forms.Padding
PaintLayerBackground 1 Short
PaintLayerForeground 2 Short
PaletteTracing Nothing System.Diagnostics.TraceSwitch
Parent error: cannot obtain value System.Windows.Forms.Control
parent Nothing System.Windows.Forms.Control
ParentContainerControl error: cannot obtain value System.Windows.Forms.ContainerControl
ParentForm error: cannot obtain value System.Windows.Forms.Form
ParentFormInternal error: cannot obtain value System.Windows.Forms.Form
ParentInternal error: cannot obtain value System.Windows.Forms.Control
picnumber 0 Integer
PreferredSize error: cannot obtain value System.Drawing.Size
ProductName error: cannot obtain value String
ProductVersion error: cannot obtain value String
PropAcceptButton 46 Integer
PropAccessibility 19 Integer
PropAccessibleDefaultActionDescription 17 Integer
PropAccessibleDescription 18 Integer
PropAccessibleHelpProvider 27 Integer
PropAccessibleName 21 Integer
PropAccessibleRole 22 Integer
PropActiveMdiChild 63 Integer
PropActiveXImpl 24 Integer
PropagatingImeMode error: cannot obtain value System.Windows.Forms.ImeMode
propagatingImeMode Inherit {-1} System.Windows.Forms.ImeMode
PropAmbientPropertiesService 37 Integer
PropAutoScrollOffset 29 Integer
PropAxContainer 74 Integer
PropBackBrush 1 Integer
PropBackColor 5 Integer
PropBackgroundImage 8 Integer
PropBackgroundImageLayout 26 Integer
PropBindingManager 16 Integer
PropBindings 15 Integer
PropCacheTextCount 35 Integer
PropCacheTextField 36 Integer
PropCancelButton 47 Integer
PropContextMenu 11 Integer
PropContextMenuStrip 28 Integer
PropControlsCollection 4 Integer
PropControlVersionInfo 25 Integer
PropCurMenu 52 Integer
PropCurrentAmbientFont 3 Integer
PropCursor 12 Integer
PropDefaultButton 48 Integer
PropDialogOwner 49 Integer
PropDisableImeModeChangedCount 33 Integer
PropDummyMenu 51 Integer
+ Properties {System.Windows.Forms.PropertyStore} System.Windows.Forms.PropertyStore
+ propertyStore {System.Windows.Forms.PropertyStore} System.Windows.Forms.PropertyStore
PropFont 7 Integer
PropFontHandleWrapper 9 Integer
PropFontHeight 2 Integer
PropForeColor 6 Integer
PropFormerlyActiveMdiChild 64 Integer
PropFormMdiParent 62 Integer
PropImeMode 32 Integer
PropImeWmCharsToIgnore 31 Integer
PropLastCanEnableIme 34 Integer
PropMainMenu 50 Integer
PropMainMenuStrip 66 Integer
PropMaximizedBounds 56 Integer
PropMaxTrackSizeHeight 61 Integer
PropMaxTrackSizeWidth 60 Integer
PropMdiChildFocusable 65 Integer
PropMdiControlStrip 68 Integer
PropMdiWindowListStrip 67 Integer
PropMergedMenu 53 Integer
PropMinTrackSizeHeight 59 Integer
PropMinTrackSizeWidth 58 Integer
PropName 0 Integer
PropNcAccessibility 20 Integer
PropOpacity 70 Integer
PropOwnedForms 55 Integer
PropOwnedFormsCount 57 Integer
PropOwner 54 Integer
PropPaintingException 23 Integer
PropRegion 13 Integer
PropRightToLeft 14 Integer
PropSecurityTip 69 Integer
PropTransparencyKey 71 Integer
PropUseCompatibleTextRendering 30 Integer
PropUserData 10 Integer
RawBackColor error: cannot obtain value System.Drawing.Color
RecreatingHandle error: cannot obtain value Boolean
reflectParent Nothing System.Windows.Forms.Control
ReflectParent Nothing System.Windows.Forms.Control
Region error: cannot obtain value System.Drawing.Region
RenderRightToLeft error: cannot obtain value Boolean
RenderTransparencyWithVisualStyles error: cannot obtain value Boolean
RenderTransparent error: cannot obtain value Boolean
+ requestedScrollMargin {Width = 0 Height = 0} System.Drawing.Size
RequiredScaling error: cannot obtain value System.Windows.Forms.BoundsSpecified
requiredScaling 31 Byte
RequiredScalingEnabled error: cannot obtain value Boolean
RequiredScalingEnabledMask 16 Byte
RequiredScalingMask 15 Byte
resetRTLHScrollValue False Boolean
ResizeRedraw error: cannot obtain value Boolean
RestoreBounds error: cannot obtain value System.Drawing.Rectangle
+ restoreBounds {X = -1 Y = -1 Width = 608 Height = 399} System.Drawing.Rectangle
+ restoredWindowBounds {X = -1 Y = -1 Width = -1 Height = -1} System.Drawing.Rectangle
restoredWindowBoundsSpecified None {0} System.Windows.Forms.BoundsSpecified
Right error: cannot obtain value Integer
RightToLeft error: cannot obtain value System.Windows.Forms.RightToLeft
RightToLeftLayout error: cannot obtain value Boolean
rightToLeftLayout False Boolean
ScaleChildren error: cannot obtain value Boolean
+ scrollMargin {Width = 0 Height = 0} System.Drawing.Size
+ scrollPosition {X = 0 Y = 0} System.Drawing.Point
scrollState 0 Integer
ScrollStateAutoScrolling 1 Integer
ScrollStateFullDrag 16 Integer
ScrollStateHScrollVisible 2 Integer
ScrollStateUserHasScrolled 8 Integer
ScrollStateVScrollVisible 4 Integer
securitySite Nothing String
securityZone Nothing String
ShouldAutoValidate error: cannot obtain value Boolean
ShowFocusCues error: cannot obtain value Boolean
ShowIcon error: cannot obtain value Boolean
ShowInTaskbar error: cannot obtain value Boolean
ShowKeyboardCues error: cannot obtain value Boolean
ShowParams error: cannot obtain value Integer
ShowWithoutActivation error: cannot obtain value Boolean
Site error: cannot obtain value System.ComponentModel.ISite
site Nothing System.ComponentModel.ISite
Size error: cannot obtain value System.Drawing.Size
sizeGripRenderer Nothing System.Windows.Forms.VisualStyles.VisualStyleRenderer
SizeGripSize 16 Integer
SizeGripStyle error: cannot obtain value System.Windows.Forms.SizeGripStyle
+ smallIcon {System.Drawing.Icon} System.Drawing.Icon
StartPosition error: cannot obtain value System.Windows.Forms.FormStartPosition
+ state {System.Collections.Specialized.BitVector32} System.Collections.Specialized.BitVector32
state2 2124 Integer
STATE2_BECOMINGACTIVECONTROL 32 Integer
STATE2_CLEARLAYOUTARGS 64 Integer
STATE2_HAVEINVOKED 1 Integer
STATE2_INPUTCHAR 256 Integer
STATE2_INPUTKEY 128 Integer
STATE2_INTERESTEDINUSERPREFERENCECHANGED 8 Integer
STATE2_ISACTIVEX 1024 Integer
STATE2_LISTENINGTOUSERPREFERENCECHANGED 4 Integer
STATE2_MAINTAINSOWNCAPTUREMODE 16 Integer
STATE2_SETSCROLLPOS 2 Integer
STATE2_UICUES 512 Integer
STATE2_USEPREFERREDSIZECACHE 2048 Integer
STATE_ALLOWDROP 64 Integer
STATE_CAUSESVALIDATION 131072 Integer
STATE_CHECKEDHOST 16777216 Integer
STATE_CREATED 1 Integer
STATE_CREATINGHANDLE 262144 Integer
STATE_DISPOSED 2048 Integer
STATE_DISPOSING 4096 Integer
STATE_DOUBLECLICKFIRED 67108864 Integer
STATE_DROPTARGET 128 Integer
STATE_ENABLED 4 Integer
STATE_EXCEPTIONWHILEPAINTING 4194304 Integer
STATE_HOSTEDINDIALOG 33554432 Integer
STATE_ISACCESSIBLE 1048576 Integer
STATE_LAYOUTDEFERRED 512 Integer
STATE_LAYOUTISDIRTY 8388608 Integer
STATE_MIRRORED 1073741824 Integer
STATE_MODAL 32 Integer
STATE_MOUSEENTERPENDING 8192 Integer
STATE_MOUSEPRESSED 134217728 Integer
STATE_NOZORDER 256 Integer
STATE_OWNCTLBRUSH 2097152 Integer
STATE_PARENTRECREATING 536870912 Integer
STATE_RECREATE 16 Integer
STATE_SIZELOCKEDBYOS 65536 Integer
STATE_TABSTOP 8 Integer
STATE_THREADMARSHALLPENDING 32768 Integer
STATE_TOPLEVEL 524288 Integer
STATE_TRACKINGMOUSEEVENT 16384 Integer
STATE_USEWAITCURSOR 1024 Integer
STATE_VALIDATIONCANCELLED 268435456 Integer
STATE_VISIBLE 2 Integer
stateParentChanged 16 Integer
stateProcessingMnemonic 4 Integer
stateScalingChild 8 Integer
stateScalingNeededOnLayout 1 Integer
stateValidating 2 Integer
SupportsUseCompatibleTextRendering error: cannot obtain value Boolean
System.Windows.Forms.Layout.IArrangedElement.Children error: cannot obtain value System.Windows.Forms.Layout.ArrangedElementCollection
System.Windows.Forms.Layout.IArrangedElement.Container error: cannot obtain value System.Windows.Forms.Layout.IArrangedElement
System.Windows.Forms.Layout.IArrangedElement.DisplayRectangle error: cannot obtain value System.Drawing.Rectangle
System.Windows.Forms.Layout.IArrangedElement.ParticipatesInLayout error: cannot obtain value Boolean
System.Windows.Forms.Layout.IArrangedElement.Properties error: cannot obtain value System.Windows.Forms.PropertyStore
TabIndex error: cannot obtain value Integer
tabIndex -1 Integer
TabStop error: cannot obtain value Boolean
Tag error: cannot obtain value Object
TaskbarOwner error: cannot obtain value System.Runtime.InteropServices.HandleRef
text Nothing String
Text error: cannot obtain value String
Text error: cannot obtain value String
+ threadCallbackList {System.Collections.Queue} System.Collections.Queue
threadCallbackMessage 49954 Integer
Top 174 Integer
TopLevel error: cannot obtain value Boolean
TopLevelControl error: cannot obtain value System.Windows.Forms.Control
TopLevelControlInternal error: cannot obtain value System.Windows.Forms.Control
TopMost error: cannot obtain value Boolean
TopMostParent error: cannot obtain value System.Windows.Forms.Control
trackMouseEvent Nothing System.Windows.Forms.NativeMethods.TRACKMOUSEEVENT
TransparencyKey error: cannot obtain value System.Drawing.Color
+ tw {TwainGUI.vb.TwainLib.Twain} TwainGUI.vb.TwainLib.Twain
uiCuesState 0 Integer
UISTATE_FOCUS_CUES_HIDDEN 1 Integer
UISTATE_FOCUS_CUES_MASK 15 Integer
UISTATE_FOCUS_CUES_SHOW 2 Integer
UISTATE_KEYBOARD_CUES_HIDDEN 16 Integer
UISTATE_KEYBOARD_CUES_MASK 240 Integer
UISTATE_KEYBOARD_CUES_SHOW 32 Integer
unvalidatedControl Nothing System.Windows.Forms.Control
updateCount 0 Short
UseCompatibleTextRenderingDefault True Boolean
UseCompatibleTextRenderingInt error: cannot obtain value Boolean
+ userAutoScrollMinSize {Width = 0 Height = 0} System.Drawing.Size
userWindowText "TWAIN GUI" String
UseWaitCursor error: cannot obtain value Boolean
ValidationCancelled error: cannot obtain value Boolean
VersionInfo error: cannot obtain value System.Windows.Forms.Control.ControlVersionInfo
+ verticalScroll {System.Windows.Forms.VScrollProperties} System.Windows.Forms.VScrollProperties
VerticalScroll error: cannot obtain value System.Windows.Forms.VScrollProperties
Visible error: cannot obtain value Boolean
VScroll error: cannot obtain value Boolean
Width 608 Integer
width 608 Integer
+ window {System.Windows.Forms.Control.ControlNativeWindow} System.Windows.Forms.Control.ControlNativeWindow
WindowExStyle error: cannot obtain value Integer
WindowState error: cannot obtain value System.Windows.Forms.FormWindowState
WindowStyle error: cannot obtain value Integer
WindowTarget error: cannot obtain value System.Windows.Forms.IWindowTarget
WindowText error: cannot obtain value String
WM_GETCONTROLNAME 49945 Integer
WM_GETCONTROLTYPE 49946 Integer
x 132 Integer
y 174 Integer
QuestionHow do I check if the scanner is plugged in Pin
peter.goessweiner23-Jan-08 10:22
peter.goessweiner23-Jan-08 10:22 
AnswerRe: How do I check if the scanner is plugged in Pin
zahil5-Jun-08 18:57
zahil5-Jun-08 18:57 
AnswerRe: How do I check if the scanner is plugged in Pin
sptyangzhou16-Jul-08 3:58
sptyangzhou16-Jul-08 3:58 
QuestionHow to set 100*100 Dpi without showing User Interface Pin
Member 159761323-Jan-08 2:11
Member 159761323-Jan-08 2:11 
AnswerRe: How to set 100*100 Dpi without showing User Interface Pin
zahil5-Jun-08 19:00
zahil5-Jun-08 19:00 
GeneralResolution of saved image Pin
Ziggy Short17-Jan-08 5:33
Ziggy Short17-Jan-08 5:33 
GeneralRe: Resolution of saved image [modified] Pin
Neal175922-Jul-11 9:38
Neal175922-Jul-11 9:38 
QuestionLoading saved files Pin
Ziggy Short17-Jan-08 3:06
Ziggy Short17-Jan-08 3:06 
Questionhelp on duplex Pin
Member 376198314-Jan-08 9:37
Member 376198314-Jan-08 9:37 
GeneralMaking renameable folders Pin
Rolly 13-Jan-08 18:52
Rolly 13-Jan-08 18:52 
GeneralAnother implementation available Pin
PKultimPK28-Dec-07 2:07
PKultimPK28-Dec-07 2:07 
Questionhow to change the resolution in code.. Pin
sreenivas keerthi10-Dec-07 18:38
sreenivas keerthi10-Dec-07 18:38 
Questionhow to change the resolution within code.? Pin
vissu10-Dec-07 17:48
vissu10-Dec-07 17:48 
GeneralAttempted to read or write protected memory. This is often an indication that other memory is corrupt. [modified] Pin
ViRiX8-Dec-07 16:42
ViRiX8-Dec-07 16:42 
GeneralRe: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Pin
ViRiX8-Dec-07 17:47
ViRiX8-Dec-07 17:47 
GeneralRe: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Pin
flaviozoc27-Aug-10 5:08
flaviozoc27-Aug-10 5:08 
GeneralProblem w HP C4180, "HP Scanning" Pin
GuntiNDDS27-Dec-07 11:27
GuntiNDDS27-Dec-07 11:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.