Hi, the way you do it, button2 is not disabled at all, since the 2-second period it is disabled you also "stop the world" by holding off the GUI thread. don't put Thread.Sleep() in an event handler, it stops the GUI, which you never want to happen. Instead, disable button2 and organize something to re-enable the button later. For instance launch a Windows.Forms.Timer; when that timer expires, re-enable button2. :)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google