To freeze the exicution for specified period we use threading.thread.sleep() in timer tick event.....
But my problem is how to freeze the exicution of a button clivk event for a specified time.....??
I jst tried to use threading.thread.sleep()
But its not working in button click event

Not sure exactly what you are trying to do but using System.Threading.Thread.Sleep(X) will freeze the entire application until the timer is up. Try this:

Sub Wait(byval X as integer)
    Dim sTime = Now
    Dim eTime = sTime.AddSeconds(X)
    Do Until Now = eTime
    Loop
End Sub

Using that method your application will wait the specified time without freezing your app to do so. To use it just add Wait(5) to wait 5 seconds.

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.