Click here to Skip to main content
15,887,404 members
Home / Discussions / C#
   

C#

 
AnswerRe: Can this be refractored Pin
martin_hughes28-Jul-09 12:41
martin_hughes28-Jul-09 12:41 
Questionbutton onclick event Pin
djg28-Jul-09 8:57
djg28-Jul-09 8:57 
AnswerRe: button onclick event Pin
musefan28-Jul-09 9:29
musefan28-Jul-09 9:29 
GeneralRe: button onclick event Pin
djg28-Jul-09 9:57
djg28-Jul-09 9:57 
GeneralRe: button onclick event [modified] Pin
musefan28-Jul-09 10:19
musefan28-Jul-09 10:19 
AnswerRe: button onclick event Pin
PIEBALDconsult28-Jul-09 9:29
mvePIEBALDconsult28-Jul-09 9:29 
GeneralRe: button onclick event Pin
djg28-Jul-09 10:05
djg28-Jul-09 10:05 
GeneralRe: button onclick event Pin
musefan28-Jul-09 10:28
musefan28-Jul-09 10:28 
The problem here is you are disabling the button and then 'freezing' the UI thread.

So when you click the button, or anything in the form then that click can not be processed until the form unfreezes. The form will only unfreeze once the thread sleep has finished and the Tick event is complete (at which point the button is re-enabled) so the 'Click' is effectively done on an enabled button.

Basically it is the form that is processing your click and is can only do so when it the UI thread is free to do so.

Life goes very fast. Tomorrow, today is already yesterday.

GeneralRe: button onclick event Pin
PIEBALDconsult28-Jul-09 10:38
mvePIEBALDconsult28-Jul-09 10:38 
AnswerRe: button onclick event Pin
PIEBALDconsult28-Jul-09 10:03
mvePIEBALDconsult28-Jul-09 10:03 
QuestionArticle not added yet !!! Pin
HiteshSharma28-Jul-09 8:17
HiteshSharma28-Jul-09 8:17 
AnswerRe: Article not added yet !!! Pin
DaveyM6928-Jul-09 8:22
professionalDaveyM6928-Jul-09 8:22 
AnswerRe: Article not added yet !!! Pin
PIEBALDconsult28-Jul-09 8:27
mvePIEBALDconsult28-Jul-09 8:27 
AnswerRe: Article not added yet !!! Pin
Robin_Roy28-Jul-09 23:55
Robin_Roy28-Jul-09 23:55 
GeneralRe: Article not added yet !!! Pin
HiteshSharma29-Jul-09 0:01
HiteshSharma29-Jul-09 0:01 
QuestionModal form from modal form Pin
RobScripta28-Jul-09 7:39
professionalRobScripta28-Jul-09 7:39 
AnswerRe: Modal form from modal form Pin
musefan28-Jul-09 7:54
musefan28-Jul-09 7:54 
AnswerRe: Modal form from modal form Pin
Alan N28-Jul-09 7:56
Alan N28-Jul-09 7:56 
AnswerRe: Modal form from modal form Pin
Abhishek Sur28-Jul-09 7:56
professionalAbhishek Sur28-Jul-09 7:56 
GeneralRe: Modal form from modal form Pin
RobScripta28-Jul-09 8:19
professionalRobScripta28-Jul-09 8:19 
GeneralRe: Modal form from modal form Pin
Abhishek Sur28-Jul-09 22:12
professionalAbhishek Sur28-Jul-09 22:12 
QuestionXMLwriter error Pin
newXMLdeveloper28-Jul-09 7:00
newXMLdeveloper28-Jul-09 7:00 
AnswerRe: XMLwriter error Pin
Blikkies28-Jul-09 20:36
professionalBlikkies28-Jul-09 20:36 
Questionreg : cache concepts Pin
Somnath Sen28-Jul-09 6:34
Somnath Sen28-Jul-09 6:34 
AnswerRe: reg : cache concepts Pin
Abhijit Jana28-Jul-09 6:43
professionalAbhijit Jana28-Jul-09 6:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.