>Jim,
>
>This code works if they press the escape key but what if I wanted to let them press the cancel key to exit. Is there a function I can call that will let me know this. I know I could write a function that would check mouse coordinates and return a .T. or .F. based on this but I was hoping for something less *kludgy*
>
>Mark A. Struck
Mark,
If you check the example again I said to set the Cancel proeprty of the cancel button to .T.. Doing this makes clicking the cancel button the same as pressing the escape key. If the user clicks the button LASTKEY() willb e 27 and if they press the escape key the button's click code will run.