bardecode.com
barcode reading software
  • Home
  • Download
  • Purchase
  • SDK Licensing
  • Pricing
    • Windows SDK Price List
    • Windows SDK with PDF Extension Price List
    • Linux SDK Price List
    • Linux SDK with PDF Extension Price List
    • PDF Extension For Windows Price List
    • Multi-Platform Toolkit for .NET Price List
    • BardecodeFiler Desktop Only Price List
    • BardecodeFiler Windows Service Price List
    • DOS Command Prompt Barcode Tool Price List
    • Terms and Conditions
    • Refund Policy
  • Products
    • Softek Barcode Reader Toolkit for Windows
    • Softek Barcode Reader Toolkit for Linux
    • BardecodeFiler Desktop App
    • BardecodeFiler Windows Service
    • Windows DOS Command Prompt Tool
    • Multi-platform barcode reader toolkit for .NET
    • Aquaforest’s Autobahn DX
  • Knowledge Base
    • Documentation
    • Specifications
  • News
  • Contact
    • About Us
    • Terms and Conditions
    • Resellers
    • Links
Select Page ...

News

GetBarStringPos - position and page number for a barcode

admin October 26, 2009 Documentation, Knowledge Base No Comments

Syntax

 

.net:

System.Drawing.Rectangle Object.GetBarStringRect(n)
Object.GetBarStringPage(n)

com:

Object.BarStringPage(n)
Object.BarStringTopLeftX(n)
Object.BarStringTopLeftY(n)
Object.BarStringBottomRightX(n)
Object.BarStringBottomRightY(n)

ocx:

pageNo = Object.GetBarStringPos(n, &TopLeftX &TopLeftY, &BottomRightX,  &BottomRightY)

dll:

pageNo =  mtGetBarStringPos(hBarcode, n, &TopLeftX, &TopLeftY, &BottomRightX, &BottomRightY)

Parameters

hBarcode Handle to an instance of the barcode toolkit (dll only).
n 1-based index to barcode to be queried.
TopLeftX variable to receive x coordinate of the top left hand corner of rectangle
TopLeftY variable to receive x coordinate of the top left hand corner of rectangle
BottomRightX variable to receive x coordinate of the bottom right hand corner of rectangle
BottomRightY variable to receive y coordinate of the bottom right hand corner of rectangle

Return value

GetBarStringRect returns a System.Drawing.Rectangle object.
GetBarStringPage, GetBarStringPos, mtGetBarStringPos and BarStringPage return the page number (indexed from 1) for the barcode.
BarStringTopLeftX etc return the coordinates of the dounding rectangle.

Remarks

GetBarStringPos and the related group of functions are used to obtain the page number and bounding rectangle of a barcode. The methods available and the way in which they are called differ from interface to interface. Note that the bounding rectangle only covers the readable area of the barcode and if MultipleRead is set to false it will only cover a portion of the barcode. 

In the case of the dll and ocx interfaces, the GetBarStringPos function returns the page number.

Win32 dll declarations:

VB.Net:

Private Declare Function mtGetBarStringPos Lib “SoftekBarcode” (ByVal hBarcode As System.IntPtr, ByVal nBarCode As Short, ByRef TopLeftX As Integer, ByRef TopLeftY As Integer, ByRef BottomRightX As Integer, ByRef BottomRightY As Integer) As Short

 

Visual C++:

short __stdcall mtGetBarStringPos(HANDLE hBarcode, short nBarCode, long FAR* pTopLeftX, long FAR* pTopLeftY, long FAR* pBotRightX, long FAR* pBotRightY);

 

← GetBarStringType – get the type of barcode
GetBarStringDirection – retrieve the orientation of a barcode →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved