Is there a simple solution / idea / strategy for creating an equivalent setTimeout function in a WinForms application. I am primarily a web developer, but not sure how to do this in a WinForms application. Basically, I have a text box, and after every keystroke, I want to run a task to populate a list (for example, an auto-complete type thingy), but I want to be able to cancel (for example, clearTimeout) if the user continues to enter characters .. .
My only assumption is that you can use BackGroundWorker and compose it first, and while he sleeps, you can cancel it if the user stops entering keys and the waiting period ends, then he starts and starts the task, etc.
(I don't care what the C # or Vb.Net example is)
davidsleeps
source share