.net - Winforms equivalent of javascript setTimeout -
is there simple solution/idea/strategy create settimeout equivalent function in winforms app. i'm web developer not sure how i'd go in winforms app. basically, have textbox, , after each keystroke want run task populate list (like auto-complete type thingy) want able cancel (e.g. cleartimeout) if user keeps entering characters...
my guess perhaps use backgroundworker , make sleep initially, , while sleeping, cancelled, if user stops entering keys , sleep period ends, goes , runs task etc
(i don't care if example c# or vb.net)
you can use system.timers.timer: set autoreset false , use start/stop methods , create handler elapsed event.
Comments
Post a Comment