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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top