RightMargin Example for Visual Basic

Dim RasterTwain As New LEADRasterTwain_U
Dim twFrm As New twFrame_U
Dim CapVal As New LEADRasterVariant_U
Dim TwainCap As New LEADTwainCapability_U

RasterTwain.InitSession hWnd
RasterTwain.SelectSource

TwainCap.EnableMethodErrors = False
TwainCap.CapInfo.Capability = L_TWUN_INCHES
TwainCap.CapInfo.ConType = L_TWON_ONEVALUE
TwainCap.CapOneValue.OneValItemType = L_TWTY_UINT16
CapVal.Type = VALUE_USHORT
CapVal.LongValue = L_TWUN_INCHES
TwainCap.CapOneValue.OneValCapValue = CapVal

twFrm.RightMargin = 0
twFrm.LeftMargin = 0
twFrm.BottomMargin = 10
twFrm.TopMargin = 10

TwainCap.EnableMethodErrors = False
TwainCap.CapInfo.Capability = L_ICAP_FRAMES
TwainCap.CapInfo.ConType = L_TWON_ONEVALUE
TwainCap.CapOneValue.OneValItemType = L_TWTY_FRAME
CapVal.Type = VALUE_DISPATCH
CapVal.DispatchValue = twFrm
TwainCap.CapOneValue.OneValCapValue = CapVal

RasterTwain.SetCapability2 TwainCap, L_LTWAIN_CAPABILITY_SET