Anybody please help me to put delay in vb.net without freezing form
nav010 0 Newbie Poster
Recommended Answers
Jump to PostIf 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.
Jump to PostOk. 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?
Jump to Postother 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.
All 9 Replies
Teme64 215 Veteran Poster
nav010 0 Newbie Poster
Teme64 215 Veteran Poster
Teme64 215 Veteran Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
realheaven 0 Newbie Poster
realheaven 0 Newbie Poster
realheaven 0 Newbie Poster
mad4x4 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.