Built-in password keyboard to input numeric variables and jump to the page according to the password
[Copy link]
Example : Use TOPWAY Smart LCD (HMT050CC-C) to enter password using password keyboard
Step 1: Create a project
Step 2: Create three pages and import pictures
Step 3: Associate the page with the background image
1. Click the work area and the page properties will be displayed on the right.
2. Select the page background image in Background Image in the properties
Note: DP0000 is the login page; DP0001 is the login failure page; DP0002 is the login success page
Step 4: Create N32 VP address
1. In the Resource window, right-click 32bit Number Variables and select New VP
Step 5: Create touch key elements and set attribute values
1. Click the touch key element in the menu toolbar
2. Drag a rectangular area in the page workspace to create a touch key element on the page.
3. In the properties, select On Press Down : Inverse Color
4. Select Target in the properties : PG0001
5. In the properties, select Call : Keyboard password
6. Enter the Title/Value in the properties: "Enter password"
7. Select VP Address in the properties : 0x000000
Step 6: Create virtual keys and set property values
1. Click the virtual key on the menu toolbar
2. Drag a rectangular area in the page workspace to create a touch key element on the page.
3. Select Monitor-VP in the properties : 0x020000
4. Monitor-Value settingin properties : 12345(*1)
5. Target setting in properties: PG0002
6. Create a retry button and set the jump page: PG0000
Note: Set the password value ( if the address value of 0x020000 is equal to 12345 , the password input is correct and jumps to the target page )
Step 7 Page Function and Setting Property Values
1. Right-click the page and select " Page Functions"
2. Click the " Add" button
3. Select Functions List ID: 0
4. Select Call in the properties : VP:=BUFF
5. Select VP Address in the properties : 0x020000
6. Press the " Enter" key to complete
Step 8 Download and compile
Step 9 Power-on display
1. Disconnect the USB from the module
2. Provide 5V powerto the module
3. Power-on display
4. Click the "Administrator Login" button
5. Enter the password on the keyboard: " 12345"
6. Click the " ok" button to complete
7. If login fails, press the "Retry" button
Done .
|