BruceN wrote:What am I doing wrong?search for INKEY() and replace it with AppEvent()
Code: Select all
DO WHILE ! oTB:stabilize()
IF lUseEvent
IF (nEvent := NextAppEvent( @mp1, @mp2, @oXbp )) > xbe_None .AND. ;
(nEvent <> xbeM_Motion )
nEvent := AppEvent( @mp1, @mp2, @oXbp )
EXIT
ENDIF
ELSE
/* wird durch Tastendruck unterbrochen */
IF (nKey := InKey()) <> 0
EXIT
ENDIF
ENDIF
ENDDO
...
IF lUseEvent
nEvent := AppEvent( @mp1, @mp2, @oXbp, 0 )
ELSE
/* Warten auf Tastendruck */
nKey := InKey(0)
ENDIF
...
IF ! lUseEvent
nEvent := LastAppEvent( @mp1, @mp2, @oXbp )
ENDIF
...
DO CASE
/* Normale Tastaturverarbeitung */
CASE nEvent == xbe***
...
OTHERWISE
IF lUseEvent
nDir := TBHandleEvent( oTB, nEvent, mp1, mp2, oXbp )
ELSE
nDir := TBApplyKey( oTB, nKey )
ENDIF
ENDCASE