Errrr - a bit more info about your latest issue might make it easier to help you...
For us "old" ex-Visual Basic developers, Sleep(x) is generally used wherever a DoEvents might have been needed. Eg: If you have a loop that loads a long list of values into a listview, you would put Sleep(0) at the end of each iteration so that the list updates as it's being loaded - otherwise the user is sitting there looking at a screen that's doing nothing until the loading loop has completed.
In other words, anywhere you have a long process that runs on the UI thread is a good candidate for using Sleep(x).
- Colin.