|
- Properties specific to the description of BarCodes variables
- Correspondence between the ..Content and ..TypeContent properties
- Functions that use the BarCodes variables
BarCodes (Type of variable) In french: CodeBarres
MyQRCode is BarCodes MyQRCode..ContentType = bcTypeText MyQRCode..TypeBarCode = BC_QRCODE MyQRCode..Content = "http://www.windev.com"
// Assign to a Bar Code control BCOD_BCControl = MyQRCode
Versions 24 and later
// Generate a QRCode with an image MyQRCode is BarCodes MyQRCode..ContentType = bcTypeText MyQRCode..TypeBarCode = BC_QRCODE MyQRCode..Content = "[no_http]www.windev.com" MyQRCode..CorrectionError = qrcodeLevelM // For an image proportion of 3%, // it is possible to use qrcodeLevelH or qrcodeLevelQ, but not qrcodeLevelL MyQRCode..Image = fExeDir + fSep + "windev.png" MyQRCode..ImageProportion = 3 // Assign to a Bar Code control BCOD_BCControl = MyQRCode
New in version 24
// Generate a QRCode with an image MyQRCode is BarCodes MyQRCode..ContentType = bcTypeText MyQRCode..TypeBarCode = BC_QRCODE MyQRCode..Content = "[no_http]www.windev.com" MyQRCode..CorrectionError = qrcodeLevelM // For an image proportion of 3%, // it is possible to use qrcodeLevelH or qrcodeLevelQ, but not qrcodeLevelL MyQRCode..Image = fExeDir + fSep + "windev.png" MyQRCode..ImageProportion = 3 // Assign to a Bar Code control BCOD_BCControl = MyQRCode
// Generate a QRCode with an image MyQRCode is BarCodes MyQRCode..ContentType = bcTypeText MyQRCode..TypeBarCode = BC_QRCODE MyQRCode..Content = "[no_http]www.windev.com" MyQRCode..CorrectionError = qrcodeLevelM // For an image proportion of 3%, // it is possible to use qrcodeLevelH or qrcodeLevelQ, but not qrcodeLevelL MyQRCode..Image = fExeDir + fSep + "windev.png" MyQRCode..ImageProportion = 3 // Assign to a Bar Code control BCOD_BCControl = MyQRCode
Remarks Properties specific to the description of BarCodes variables The following properties can be used to handle a bar code: | | | Property name | Type used | Effect |
---|
Content | Any type | Value of bar code. - For the QR Code bar codes, the type of this value depends on ..ContentType.
See the note below to find out the correspondence between the type of content and the type of value. - For the bar codes other than QR Code, when reading a bar code, this property is always a "Character string" property and its value is identical to the value of ..RoughValue.
| CorrectionError | Integer constant | Correction level of error: used to define the threshold for reading a damaged bar code. This property is available for: - the QR Code bar codes.
- the PDF-417 bar codes.
Versions 21 and laterthe Aztec bar codes. New in version 21the Aztec bar codes. the Aztec bar codes.
The following constants are available for the QR Code: - qrcodeLevelH: about 30% of encoded words can be restored.
- qrcodeLevelL: about 7% of encoded words can be restored.
- qrcodeLevelM: about 15% of encoded words can be restored.
- qrcodeLevelQ: about 25% of encoded words can be restored.
The selected correction level triggers: - the resizing of bar code.
- the modification of the maximum number of characters allowed in the bar code.
A higher correction level means that the drawing of the bar code will have an important size and that less data will be drawn. On the contrary, a higher correction level means that the bar code will be readable even if the support is damaged. Tips: - If the bar code contains a URL, the level L is sufficient.
- If a logo is inserted into the bar code, we recommend that you use a higher level (M or Q).
- If the bar code is intended for printing labels for a warehouse, the level H must be used.
For the PDF-417 bar codes, the correction level of the error corresponds to an integer included between 0 and 8. Versions 21 and laterFor the Aztec bar codes, the correction level corresponds to an integer included between 5 and 95, representing the percentage of error correction. The default value is 33. If the given value is - less than 5, the value will be set to 5,
- greater than 95, the value will be set to 95,
- negative, the value will be set to 33 (default value).
New in version 21For the Aztec bar codes, the correction level corresponds to an integer included between 5 and 95, representing the percentage of error correction. The default value is 33. If the given value is - less than 5, the value will be set to 5,
- greater than 95, the value will be set to 95,
- negative, the value will be set to 33 (default value).
For the Aztec bar codes, the correction level corresponds to an integer included between 5 and 95, representing the percentage of error correction. The default value is 33. If the given value is - less than 5, the value will be set to 5,
- greater than 95, the value will be set to 95,
- negative, the value will be set to 33 (default value).
| Versions 24 and laterImage New in version 24Image Image | | Image added in the center of the bar code (only for QR Codes). This image can correspond to: - an Image variable,
- a character string containing the path of the image file to be used,
- an image memo item, etc.
| Options | Integer constant (or combination of constants) | Characteristics of bar code. These characteristics are mainly used when a bar code is printed by iPrintBarCode. The following constants can be used: - BC_Bottom: Bar code located at the bottom of destination rectangle.
- BC_ControlDigits: Bar codes containing control characters (valid for the BC_CODE128, BC_DATAMATRIX, BC_EAN128, CB_GS1_128 and BC_PDF417 bar codes). By default, the control characters are enclosed between the "<" and ">" characters. In order for these characters not to be interpreted as control characters, they must be doubled.
See The different types of bar codes for more details. - BC_CheckDigits: Bar codes containing check characters (valid for the BC_CODE128, BC_DATAMATRIX, BC_EAN128, CB_GS1_128 and BC_PDF417 bar codes).
If this option is selected, the BC_ControlDigits and BC_Charsets constants are automatically taken into account. - BC_CenterH: Bar code centered horizontally in the destination rectangle.
- BC_CenterV: Bar code centered vertically in the destination rectangle.
- BC_Right: Bar code aligned to right in the destination rectangle.
- BC_Extended: Extended bar code (valid for the BC_CODE39 and BC_CODE93 bar codes only).
Versions 18 and laterBC_FormatText: Formats the text displayed for the EAN 128 bar codes: brackets are added around AIs in the printed text. New in version 18BC_FormatText: Formats the text displayed for the EAN 128 bar codes: brackets are added around AIs in the printed text. BC_FormatText: Formats the text displayed for the EAN 128 bar codes: brackets are added around AIs in the printed text.- BC_Left: Bar code aligned to left in the destination rectangle.
- BC_Top: Bar code located at the top of destination rectangle.
- BC_IgnoreFormatting: Ignores the brackets found in a 128, EAN-128 or GS1-128 bar code (valid for the BC_CODE128, BC_EAN128 and CB_GS1_128 bar codes only).
The brackets allow the users to easily read the bar code but they are not drawn in the code. - BC_Charsets: Bar code using 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.
See The different types of bar codes for more details. - BC_NotProportional: Adjusts the bar code to the size of destination rectangle.
- BC_NoText: Displays the text below the bar code.
The text is normalized for the BC_UPCA, BC_UPCE, BC_EAN13 and BC_EAN8 bar codes. For the other types of bar codes, the text can exceed the display border of bar code. - BC_Check: Bar code with check characters (valid for the BC_CODE39, BC_CODE93, BC_INTER2OF5 and BC_CODABAR bar codes only).
- BC_Vertical: Prints the bar code vertically.
- BC_90: Prints the bar code vertically.
- BC_180: Prints the bar code while performing a rotation equal to 180 degrees.
- BC_270: Prints the bar code while performing a rotation equal to 270 degrees.
Versions 24 and later New in version 24 | Versions 24 and laterImageProportion New in version 24ImageProportion ImageProportion | Real | Percentage of the bar code area occupied by the image added in the center of the bar code (only for QR Codes whose ..Image property is specified). This value must not exceed half of the area reserved for error correction. | | Value of ..CorrectionError | Maximum value of ..ImageProportion | qrcodeLevelH | 5 | qrcodeLevelL | 1 | qrcodeLevelM | 3 | qrcodeLevelQ | 5 |
| TypeBarCode | Integer constant | Bar code type: These types are also available for the prints performed by iPrintBarCode. | ContentType | Integer constant | Nature of data stored in the bar code: - bcTypeText (default value when creating the variable): Plain text
- bcTypePhone: Phone number
- bcTypeSMS: SMS number
- bcTypeEmail: Email address
- bcTypeContact: Contact description
- bcTypeLocation: Geographical position
- bcTypeURL: URL (bookmark). To insert an http address into the bar code, use the cbTypeText type.
This constant is kept for backward compatibility and it must be used in very specific cases. - bcTypeMarket: Link to an application on Google Play (for an Android application only)
- bcTypeWiFi: Parameters for connecting to a Wi-Fi network (for an Android application only)
Note: These kinds of data are available for the 2D bar codes (QR Code, Aztec, datamatrix, PDF417, ...). For the bar codes other than 2D bar codes, the data is always text data. | RoughValue | Unicode character string | Rough value of bar code. For the bar codes other than the QR Code bar codes, the value of this property is identical to the one of ..Content. This property is available in read-only. | Note: These properties can be used with one of the following syntaxes: - <Variable name>..<Property name>
- <Variable name>.<Property name>
Correspondence between the ..Content and ..TypeContent properties | | | Type of content | Type of value (..Content) | Note |
---|
bcTypeText | Character string | Example: "WINDEV is great!" | bcTypePhone | Character string | Example: "0612345678" | bcTypeSMS | Character string In read mode: The members of the SMS structure (SMS.Message et SMS.Number) will be automatically filled with the values read in the bar code. the content will correspond to a string in the following format: <Number> + CR + <Message>In generation: If they exist, the members of the SMS structure (SMS.Message and SMS.Number) will be automatically taken into account. You also have the ability to use a character string in the following format: <Number> + CR + <Message> | Example: "0612345678<CR>Text to send" | bcTypeURL | Character string Corresponds to a bookmark. The content will be encoded in the following format: "urlto::URL". For example: "urlto::http://www.windev.com". Some decoders do not support this type of content. To specify an http address, use the cbTypeText type. Note: This constant is kept for backward compatibility and it must be used in very specific cases. | Example: "http://www.google.com" | bcTypeMarket | Character string | Example: "market://search?q=pname:com.company.application" | bcTypeWiFi | Character string | Character string in the following format: <SSID> + TAB + <Security protocol>+ TAB + <Key> Example: "MyNetwork<TAB>WPA<TAB>pwd" | bcTypeEmail | Character string | Example: "name@email.com" | bcTypeContact | Empty. In read mode: The members of the mContact structure will be automatically filled with the values read in the bar code. In generation: The members of the mContact structure will be automatically used to generate the bar code. | | bcTypeLocation | geoPosition variable. In read mode: The ..Latitude and ..Longitude properties of the variable will be automatically filled with the values read in the bar code. In generation: The ..Latitude and ..Longitude properties of the variable will be automatically used to generate the bar code. | |
Functions that use the BarCodes variables | | BCCapture | Decodes the information stored in a bar code by using the device camera (Android, iPhone, iPad). | BCDecode | Decodes the information stored in a QR Code bar code. | iPrintBarCode | Prints a bar code (inside a rectangle). |
Note: To reinitialize the content of a BarCodes variable, you have the ability to use VariableReset.
Related Examples:
|
Android (WINDEV Mobile): Android Inventory
[ + ] This application is used to perform inventories and to save the results in a database.
|
This page is also available for…
|
|
|
| |
| | https://youtu.be/ATKmFo_fB-k https://windevdesenvolvimento.blogspot.com/2019/08/dicas-2252-windev-webdev-mobile-24.html // btn gera imagen qrcode MEU_qrcode is BarCodes MEU_qrcode..Content=EDT_CONTEUDO MEU_qrcode..TypeBarCode=BC_QRCODE MEU_qrcode..CorrectionError=qrcodeLevelM MEU_qrcode..ContentType = bcTypeText MEU_qrcode..Image="C:\temp\PRAIA\i2\2019-07-14_1200.png" MEU_qrcode..ImageProportion=3 BAC_QRCODE=MEU_qrcode
|
|
|
|
| |
| |
| |
| |
| |
| |
| | |
| |