PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Displaying a bar code in a Bar Code control
  • Displaying a bar code in a Bar Code control
  • Retrieving the value of the bar code displayed in the Bar Code control
  • Properties specific to the Bar Code controls
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
Manipulating a Bar Code control programmatically
Overview
WINDEV, WEBDEV and WINDEV Mobile allow you to manipulate a Bar Code control programmatically. To do so, use the variable of the Bar Code control in the code.
The variable of the Bar Code control corresponds to the name of the Bar Code control. This variable is a text variable.
WINDEV Mobile The Bar Code control can be manipulated programmatically in the report editor only.
Versions 17 and later
iPhone/iPad The Bar Code control can now be manipulated programmatically in iPhone/iPad applications.
New in version 17
iPhone/iPad The Bar Code control can now be manipulated programmatically in iPhone/iPad applications.
iPhone/iPad The Bar Code control can now be manipulated programmatically in iPhone/iPad applications.
Versions 18 and later
iPhone/iPad This type of control is now available for reports in iPhone/iPad applications.
New in version 18
iPhone/iPad This type of control is now available for reports in iPhone/iPad applications.
iPhone/iPad This type of control is now available for reports in iPhone/iPad applications.
Versions 20 and later
Universal Windows 10 App This type of control is now available in Windows Store apps mode.
New in version 20
Universal Windows 10 App This type of control is now available in Windows Store apps mode.
Universal Windows 10 App This type of control is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This type of control is now available for windows and reports in applications in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of control is now available for windows and reports in applications in Universal Windows 10 App mode.
Universal Windows 10 App This type of control is now available for windows and reports in applications in Universal Windows 10 App mode.
Versions 22 and later
Android This type of control is now available for Android applications.
New in version 22
Android This type of control is now available for Android applications.
Android This type of control is now available for Android applications.
Displaying a bar code in a Bar Code control

Displaying a bar code in a Bar Code control

To display a bar code in a Bar Code control, a simple assignment is sufficient.
For example:
  • direct assignment:
    BAC_BarCodeControl = "123456789"
  • assignment by variable:
    BAC_BarCodeControl = Products.BarCode
Versions 16 and later
Case of QR Code bar codes:
To display a QR code in a Bar Code control, you can use a variable of type BarCode.
AndroidiPhone/iPad For example:
// Decode a QR Code bar code
MyQRCode is BarCode
MyQRCode = BCCapture()
IF ErrorOccurred = False THEN
BAC_MyBarCodeControl = MyQRCode
END
New in version 16
Case of QR Code bar codes:
To display a QR code in a Bar Code control, you can use a variable of type BarCode.
AndroidiPhone/iPad For example:
// Decode a QR Code bar code
MyQRCode is BarCode
MyQRCode = BCCapture()
IF ErrorOccurred = False THEN
BAC_MyBarCodeControl = MyQRCode
END
Case of QR Code bar codes:
To display a QR code in a Bar Code control, you can use a variable of type BarCode.
AndroidiPhone/iPad For example:
// Decode a QR Code bar code
MyQRCode is BarCode
MyQRCode = BCCapture()
IF ErrorOccurred = False THEN
BAC_MyBarCodeControl = MyQRCode
END
Remark: In a window or a page, if the control is associated with a data file item, the entered value is automatically retrieved via ScreenToFile or PageToFile. For more details, see Binding Bar Code controls to items.
Retrieving the value of the bar code displayed in the Bar Code control
Universal Windows 10 App To retrieve the value of the bar code displayed in a Bar Code control:
  • perform a simple assignment.
    For example:
    BarCodeValue = BAC_BarCodeControl
  • retrieve part of the value.
    For example:
    BeginningBarCode = Left(BAC_BarCodeControl, 3)
  • use the Value property.
Remark: If the control is associated with a data file item, the entered value is automatically retrieved via ScreenToFile. For more details, see Binding Bar Code controls to items.
Properties specific to the Bar Code controls
The following properties are used to manipulate a Bar Code control programmatically.
HorizontalAlignmentAllows you to find out and modify the horizontal alignment of a Bar Code control.
VerticalAlignmentAllows you to find out and modify the vertical alignment of a Bar Code control.
DndTargetAllows you to find out and modify the behavior of the target control during Drag and Drop.
DndSourceAllows you to find out and modify the behavior of the source control during Drag and Drop.


For a complete list of WLanguage properties that can be used with a Bar Code control, see Properties associated with a Bar Code control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment