Clicking on the X will give you xbeP_Close
Code: Select all
// Event loop = Program navigation
nEvent := 0
DO WHILE nEvent <> xbeP_Close
nEvent := AppEvent( @mp1, @mp2, @oXbp )
@ 05, 22 SAY PadR( Var2Char( nEvent ), 10 )
// Catch the key after a GUI event
IF VALTYPE(mp1) = "N" .AND. mp1 < 1000 .AND. mp1 <> 0
k = mp1
mp1 = 0
@ 10, 22 SAY PadR( Var2Char( k ), 10 )
k = 0
ELSE
oXbp:HandleEvent( nEvent, mp1, mp2 )
k = LASTKEY() // TO GET THE FUNCTIONS
@ 10, 22 SAY PadR( Var2Char( k ), 10 )
k = 0
ENDIF
ENDDO
? "Quitting"
inkey(1)