I'm creating a simple FTP client and i want this certain label to say "List refershed" after a certain action and then after 2 seconds i want the label to say "STATUS". How can i do this?
Thanks. Gonna take a look.
. I would try doing another approach.
What it does is it freezes you entire main thread in your program for the length of the durration, and sometimes can result in errors when executing certain processes before or after the thread wait.
Then there's always the option to set a timer for the given interval and do the processing when it expires. But using Thread.Sleep for a small interval like 2 seconds is not unwarranted.
What it does is it freezes you entire main thread in your program for the length of the durration
No, it causes the current thread to go to sleep for the specified duration. The logical next step is to use a separate thread for your UI (or a BackgroundWorker), if you need to perform work while also signaling updates to the UI. Oddly enough, minimal research into Thread.Sleep and the problem of UI updates will produce exactly that information. So strange... :rolleyes: