|
|
|||||||||
|
|
|
|
|
|
|||||
|
Help -> Methods -> GetBarStringPosand The Softek Barcode Reader SDK extracts barcode information from images and bitmaps. GetBarStringPos and GetBarStringRectOverview GetBarStringPos(n, &TopLeftX, &TopLeftY, &BottomRightX, &BottomRightY) System.Drawing.Rectangle GetBarStringRect(n) (.Net managed component only) In the COM object the following properties are also available: BarStringPage(n), BarStringTopLeftX(n), BarStringTopLeftY(n), BarStringBottomRightX(n), BarStringBottomRightY(n) GetBarStringPos returns the page number of the nth bar code found in the image - where n is indexed from 1. The page number is also indexed from 1. Call GetBarStringPos after ScanBarCode. TopLeftX, TopLeftY etc receive the coordinates of the rectangle that bounds the barcode. Note that this may only cover part of the height of the barcode. GetBarStringRect returns the bounding rectangle that surrounds the barcode. BarStringPage and BarStringTopLeftX etc allow access to the page number and position of a barcode through the COM object interface. This is useful when working with VB Script. Visual Basic using the OCX
Dim n As Integer [form.]SoftekBarcode.GetBarStringPos (n, TopLeftX, TopLeftY, BottomRightX, BottomRightY) Visual Basic using the DLL Private Declare Function stGetBarStringPos Lib "SoftekBarcode" (ByVal nBarCode As Integer, ByRef TopLeftX As Long, ByRef TopLeftY As Long, ByRef BottomRightX As Long, ByRef BottomRightY As Long) As Integer Dim n As Integer page = stGetBarStringPos(n, TopLeftX, TopLeftY, BottomRightX, BottomRightY) Visual Basic using COM
oBar = CreateObject("SoftekATL.Barcode") or page = oBar.BarStringPage(n)
VB.Net using the DLL Private Declare Function stGetBarStringPos Lib "SoftekBarcode" (ByVal nBarCode As Short, ByRef TopLeftX As Long, ByRef TopLeftY As Long, ByRef BottomRightX As Long, ByRef BottomRightY As Long) As Short Dim n As Short page = stGetBarStringPos(n, TopLeftX, TopLeftY, BottomRightX, BottomRightY) VB.Net using the SoftekBarcode Wrapper Class Dim barcode As SoftekBarcode Dim n As Short
.......... VB.Net using the SoftekBarcodeLib Managed Component
Dim barcode As SoftekBarcodeLib.BarcodeReader Visual C++ Using the OCX short GetBarStringPos (short n, long *pTopLeftX, long *pTopLeftY, long *pBottomRightX, long *pBottomRightY); Visual C++ Using the DLL short __stdcall stGetBarStringPos(short nBarCode, long FAR* pTopLeftX, long FAR* pTopLeftY, long FAR* pBotRightX, long FAR* pBotRightY);
|
| © 1998-2006 Softek Software Ltd. All rights reserved. |