I have an app that creates a form within AutoCAD. What is happening is that some users are clicking on some buttons on the form while a command is still active in AutoCAD (i.e Pan) and they're getting an error message. I want to be able to have my buttons perform an 'Escape' to cancel any active AutoCAD commands before performing the functions of the button. I've tried sending different commands but to no avail. This is for ACAD2K throught to ACAD2K5. I have written my app in Delphi but that souldn't matter. TIA