Posted on: 11/12/2014 10:03:08 PM | Views : 553

Hi All,
I have a button click sub and I need to disable posibility of clicking it many times. I have this code:
Dim vClick as boolean
Private sub Button1_click(...) handles button1.click
if vClick = false then
Threading.thread.sleep(2000)
vclick = true
exit sub
end if
if condition1 = 1 then
//my cody
else
vclick = false
end if
end sub
I want to disable button click for 2 seconds. It works when there are 2 button clicks. But if there are more clicks it goes to condition1. How can I prevent it?

Go to the complete details ...