Daniel,
I'm not very used to LASTKEY().
AFAIK LASTKEY() gives you the last key pressed on a single contol - even if it is days old.
From the help:
LASTKEY( ) is updated when you move between controls.
I do not understand why you check LASTKEY in the Mouse* event. If somebody press the right mousebutton the menu should appear as usual independing on last keystroke. Or does it interfere with the menu?
I personally would not use LASTKEY, INKEY and the like in an OOP environment. If I need to check for keystrokes I would use Keypress and KeyDown events to check for keys pressed. I would store the result to a property and read it in methods / events that need the information.
Agnes
>Many thanks for the info.
>
>The NODEFAULT will clear the mouse to allow the user to move along the tree, however, because of the value LASTKEY()=27 the Right Click (button=2) stops working and therefore no menu.
>
>If I press the ESC key twice, this will clear the problem and my menu appears as normal on right-click ?
>
>How do we effectively clear the ESC sequence?
>
>Tks
>
>Daniel
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]