ImageResolution Example for Visual Basic

Dim RasterTwain As New LEADRasterTwain_U

RasterTwain.InitSession hWnd
RasterTwain.SelectSource

RasterTwain.EnableMethodErrors = False
RasterTwain.GetProperties

RasterTwain.ImageResolution.Unit = L_TWUN_INCHES
RasterTwain.ImageResolution.BitsPerPixel = 1
RasterTwain.ImageResolution.HorizontalResolution = 150
RasterTwain.ImageResolution.VerticalResolution = 150
RasterTwain.ImageResolution.XScaling = 1
RasterTwain.ImageResolution.YScaling = 1
RasterTwain.ImageResolution.RotationAngle = 90#

RasterTwain.LeftMargin = 0
RasterTwain.RightMargin = 0
RasterTwain.TopMargin = 200
RasterTwain.BottomMargin = 200

RasterTwain.EnableAutoFeed = True
RasterTwain.MaxPagesNumber = -1

MsgBox "Duplex state = " + CStr(RasterTwain.DuplexScanning)

RasterTwain.SetProperties
RasterTwain.EndSession