'ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ '³ FILE: TUTOR2_1.BAS ³ '³ PURPOSE: PB/VISION(tm) LITE Tutorial Example Program ³ 'ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ '³ For instant help on any PB/VISION(tm) keyword, place the cursor on that ³ '³ keyword and press . The PB/VISION(tm) index can be accessed ³ '³ by pressing twice. The file "PBVLITE.PBH" _must_ be in the ³ '³ same directory as the PowerBASIC IDE (PB.EXE) for this feature to work ³ '³ properly. ³ 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ %ISPBU = 0 DEFINT A-Z $DYNAMIC $INCLUDE ".\WINDOW.BI" ' Ä þ 2.1.1 - INCLUDING THE "EVENT DRIVER" ROUTINES ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ $INCLUDE "EVENT.BI" APP.GRAPHICSMODE = 1 ' adds graphical mapping APP.ATTR = &H80 ' sets desktop color APP.PATTERN = 32 ' sets desktop fill pattern APPTITLE &HF0, "TUTOR2_1.BAS - AN EVENT-DRIVEN PROGRAM" APPINIT AuntEdna = WINOPEN(10, 40, &H47, 1, &H4F, "AUNT EDNA'S - PRESS TO END", &HE0, %SHADOW) WINSHOW AuntEdna, 0, 0, 25, 80 WINPRINT AuntEdna, 5, 13, &H4F, "Hello Aunt Edna" DO ' entering the "event loop ' Ä þ 2.1.2 - CALLING "GETEVENT() ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ EventID = GETEVENT(0) SELECT CASE EventID CASE 17 ' "No Event" event WINWRITE AuntEdna, "waiting... " CASE 102 ' key event EXIT DO CASE ELSE ' Other events END SELECT LOOP ' Ä þ LEAVING THE "EVENT LOOP" ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ WINCLOSE AuntEdna APPCLOSE END