Ahmad,
You need to call the PerformClick method to raise a button's click event, as in:
btnExit.PerformClick()
In the example you had, you might also consider using the ButtonCancel property for the form, so when they press escape it calls the button's click method, as in:
Me.CancelButton = btnExit
Ron
Ron Hodge
Sebrex Systems, Inc.
Atlanta, GA