When we need to set the functionality to Esc. Button, (Like press Esc. To carry out functionality of any default button) we can set that button to CancelButton Property, under Properties Tab.
To do so, select the Form, and in Properties Tab, select the CancelButton Property, select the button btnClose.( or any other button for appropriate functionality)