How to sense ESC key was pressed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a long running loop in a Windows Form (VB2005 code). I want to be able
to terminate this loop when the user presses the ESC key. Can someone tell me
how this can be achieved?

Thanks,
 
Mr.Arnold,
Thanks for your reply. but the ESC key press is sensed only after the loop
completes execution. the loop is in a procedure that is called from within a
click event of a button on a form.
 
Back
Top