ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Bar Code functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
BCCalculateControlCharacter (Function)
In french: CBCalculeCaractèreDeVérification
Returns the check code of a bar code.
Remark: This function is not available for the DataMatrix, PDF417 and QR-Code bar codes.
Example
MyBarCode is BarCode
MyBarCode.Content = "012345678901"
MyBarCode.TypeBarCode = BC_EAN13
ControlCharact is string
ControlCharact = BCCalculateControlCharacter(MyBarCode)
Syntax

Control character of a bar code found in a BarCodes variable Hide the details

<Result> = BCCalculateControlCharacter(<Bar code>)
<Result>: Character string
Control characters in the bar code.
To get more details on the error, use ErrorInfo.
<Bar code>: BarCode variable
Name of the BarCode variable containing the description of the bar code to analyze.

Control character of a specific bar code Hide the details

<Result> = BCCalculateControlCharacter(<Bar code type> , <Value of bar code> , <Extended code>)
<Result>: Character string
Control characters in the bar code.
To get more details on the error, use ErrorInfo.
<Bar code type>: Integer
Type of bar code to analyze (the different types of bar codes supported by WINDEV are presented in Managing bar codes).
BC_CODABARCodabar bar code.Bar code usable with <Extended code> corresponding to BC_Check.
BC_CODE11Code11 bar code.
BC_CODE39Code39 bar code.Bar code usable with <Extended code> corresponding to BC_Extended or BC_Check
The value of the bar code can contain the start and end characters ("*" character). In this case, these characters will be added to the drawing of the bar code and will be printed in the text displayed below the bar code.
If these characters are not found in the value of bar code, they will be automatically added to the drawing of bar code.
However, they will not be printed in the text displayed below the bar code.
BC_CODE93Code93 bar code.Bar code usable with <Extended code> corresponding to BC_Extended or BC_Check).
BC_CODE128Code128 bar code.
BC_EAN8EAN-8 bar code.Possible values for the bar code:
  • 7 characters,
  • 7 characters + 2 additional characters ("0123456+22" for example)
  • 12 characters + 5 additional characters ("012345678912+22335" for example)
A control character is automatically inserted after the 7th character.
BC_EAN13EAN-13 bar code.Possible values for the bar code:
  • 12 characters,
  • 12 characters + 2 additional characters ("012345678912+22" for example)
  • 12 characters + 5 additional characters ("012345678912+22335" for example)
A control character is automatically inserted after the 12th character.
BC_EAN128EAN-128 bar code.
BC_INTER2OF5Interleaved 2 of 5 bar code.Bar code usable with <Extended code> corresponding to BC_Check.
BC_MSIMSI bar code.
BC_UPCAUPC-A bar code.Possible values for the bar code:
  • 11 characters,
  • 11 characters + 2 additional characters ("01234567891+22" for example)
  • 11 characters + 5 additional characters ("01234567891+22335" for example)
A control character is automatically inserted after the 11th character.
BC_UPCEUPC-E bar code.Possible values for the bar code:
  • 11 characters,
  • 11 characters + 2 additional characters ("01234567891+22" for example)
  • 11 characters + 5 additional characters ("01234567891+22335" for example)
A control character is automatically inserted after the 11th character.
CB_GS1_128GS1-128 bar code (new name for the EAN-128 bar code).
<Value of bar code>: Character string
Value of the bar code to use.
<Extended code>: Integer constant (or combination of constants)
Characteristics of bar code.
BC_CharsetsBar code that uses one or more sets of characters in order to compress the bar code. This set of characters must be defined in the value of bar code.
For more details, see The different types of bar codes.
BC_CheckBar code with check characters (valid for the BC_CODE39, BC_CODE93, BC_INTER2OF5 and BC_CODABAR bar codes only).
BC_CheckDigitsBar codes containing check characters (valid for the BC_CODE128 and BC_EAN128 bar codes only).
If this option is selected, the BC_ControlDigits and BC_Charsets constants are automatically taken into account.
BC_ControlDigitsBar codes containing control characters (valid for the BC_CODE128 and BC_EAN128 bar codes only). By default, control characters are enclosed between "<" and ">". To avoid interpreting these characters as control characters, simply double the first "<":
  • "<C40>" = control character,
  • "<<AB>" = <AB> to be encoded in the bar code.
For more details, see The different types of bar codes.
BC_ExtendedExtended bar code (valid for the BC_CODE39 and BC_CODE93 bar codes only).
BC_IgnoreFormattingIgnores the brackets in a 128 or EAN-128 bar code (valid for the BC_CODE128 and BC_EAN128 bar codes only).
The brackets allow the users to easily read the bar code but they are not drawn in the code.
Component: wd290barc.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help