Tuto WINDEV 25

412 Part 7: Advanced programming 4. Display the WLanguage code of the procedure: • Position the mouse cursor on "MouseOrKeyboard". • Press F2. 5.  The procedure code is straightforward: • If the keyboard is used, the caption displayed below the List Box control contains "Selection with the keyboard". • If the mouse is used, the caption displayed below the List Box control contains "Selection with the mouse". PROCEDURE MouseOrKeyboard() // The _EVE.wMessage variable contains the message number SWITCH _EVE.wMessage // Keyboard CASE WM_KEYDOWN // Message indicating that the keyboard is used STC_SelectionType = "Selection with the keyboard" STC_SelectionType..Color = LightRed // It’s the mouse CASE WM_LBUTTONDOWN // Message indicating that the mouse is used STC_SelectionType = "Selection with the mouse" STC_SelectionType..Color = LightBlue END

RkJQdWJsaXNoZXIy NDQ0OA==