Tuto WINDEV Mobile 25

126 Part 5: Android and iOS: Developing an application ▶ As for the Button control used to take a photo, we will modify the style associated with the control: 1.  If necessary, select the Button control you have just created. 2. Open the popup menu and select "Choose a style". 3.  In the window that lists the available styles, click on the magnifier and specify "BTN_Blank". 4. Press Enter to validate. The "BTN_Blank" style is automatically selected. 5. Validate the window for style selection. 6.  The chosen style is automatically applied to the Button control. ▶ The WLanguage code of this Button control will make it possible to scan the bar code. 1. Select "Code" from the popup menu of the control (right click). 2. Write the following WLanguage code in the "Click" event: // Local variable bc is BarCodes // Start the scan bc = BCCapture() IF bc..Content <> "" THEN EDT_Bar_code = bc..Content END In this WLanguage code, BCCapture allows you to decode the information stored in a bar code using the camera of the device. 3. Save the modifications by clicking among the quick access buttons. 4. Close the code window (click X at the top right corner of code editor).

RkJQdWJsaXNoZXIy NDQ0OA==