If you use a short delay, user won't notice any freezing.
Threading.Thread.CurrentThread.Sleep(1000)
and the parameter is in milliseconds. Above code causes one second delay.
Teme64
Veteran Poster
1,031 posts since Aug 2008
Reputation Points: 218
Solved Threads: 203
Ok. Give more details, what do you exactly want to delay. Delay execution in a form? Delay execution in a class module and have still responsive UI? Delay the time before user can press a specific button but can press other buttons? Or what kind of scenario you have?
Teme64
Veteran Poster
1,031 posts since Aug 2008
Reputation Points: 218
Solved Threads: 203
If you have a situation where you want to disable some controls in a form for a specific time, disable them, start Timer-control for a specific interval and in the Timer_Tick event enable controls.
Teme64
Veteran Poster
1,031 posts since Aug 2008
Reputation Points: 218
Solved Threads: 203
other suggestion use timer.
question for u :
why teme64 suggestion with sleep() function doesn't work for u? cause i think is better to use sleep than timer control.
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444