I am a newbie to coding. But I have learned so much already jsut by reading post and other documents on line. I have not gotten a book yet for VB 2005

I am looking for the code to create a cancel button to close the window and cancel any process that is running. Thanks