Tuto WINDEV Mobile 25
206 Part 6: Windows Mobile application Programming the menu We are now going to type the code of these two menu options. ▶ To define the WLanguage code of "Exit" option: 1. In the window editor, display the "Exit" option. All you have to do is expand the menu, just like you did at run time. 2. Display the popup menu of "Exit" option (right mouse click) and select "Code". 3. Write the following code: Close() Close is used to close the current window. The "Menu" window being the only window, the application is automatically closed. ▶ To define the WLanguage code of "List of products" option: 1. In the window editor, display the "List of products" option. All you have to do is expand the menu, just like you did at run time. 2. Display the popup menu of the "List of products" option (right mouse click) and select "Code". 3. Write the following WLanguage code: Open(WIN_List_of_products) 4. Save the modifications by clicking among the quick access buttons. 5. Close the code window (click X at the top right corner of code editor). Running the application test The last step consists in specifying that the menu window is the first application window. To do so, we are going to define the first project window and run a full test of project. ▶ To define the first project window: 1. Select the "WIN_Menu" window in the "Project explorer" pane. 2. Display the popup menu. 3. Select "First project window". A specific icon (with a small 1) is displayed in front of the window name, in the "Project explorer" pane. Until now, the test of windows was run individually by clicking among the quick access buttons. ▶ To run the project test: 1. Click among the quick access buttons. 2. Your project starts with the menu window. Click an option of your menu to check whether the different links are correct. That’s it, our application is created, we must now compile it and install it on the device in order to test it in real conditions.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==