This sets the units of measurement when scanning with a custom built user interface (UiMode=2).
imagekitcontrolname.GetScan().SetUnitMode(long Val)
Property Value
Value | Explanation |
---|---|
0 | inches (Default) |
1 | centimeters |
2 | pica |
3 | points |
4 | twips |
5 | pixels |
6 | millimeters |
In Visual Basic the following constants can be used: (ikScanInch = 0, ikScanCM = 1, ikScanPica = 2, ikScanPoint = 3, ikScanTwip = 4, ikScanPixel = 5, ikScanMillimeters = 6)
Explanation
The UnitMode sets the units of measurement used to set the scanning area. The default value is 9 (ikScanInch). This property is enabled when the UiMode is 2 (ikScanNONUI). The RectLeft, RectTop, RectRight, and RectBottom property values will use the unit of measurement set in the UnitMode property. When the UnitFlag property is 0, the scan device must support the unit of measurement set in the UnitMode property.
Although the UnitMode property is disabled when the UiMode is NOT 2, when scanning, the units of measurement of the scan are returned to this property. To retrieve the values of the UnitMode property supported by the scan device, execute the GetCapEnum or the (GetCapEnumVariant) method.
Setting this value
This value can be set at runtime.
Retrieving this value
This value can be retrieved at runtime.