Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: Display Image from Path Pin
Blikkies29-Jul-09 1:32
professionalBlikkies29-Jul-09 1:32 
GeneralRe: Display Image from Path Pin
nudma29-Jul-09 4:08
nudma29-Jul-09 4:08 
GeneralRe: Display Image from Path Pin
Blue_Boy29-Jul-09 7:38
Blue_Boy29-Jul-09 7:38 
GeneralRe: Display Image from Path Pin
Blikkies29-Jul-09 8:26
professionalBlikkies29-Jul-09 8:26 
AnswerRe: Display Image from Path Pin
Blue_Boy28-Jul-09 20:23
Blue_Boy28-Jul-09 20:23 
AnswerRe: Display Image from Path Pin
Christian Graus28-Jul-09 21:01
protectorChristian Graus28-Jul-09 21:01 
QuestionApp with Crystal Reports Pin
CodingYoshi28-Jul-09 11:00
CodingYoshi28-Jul-09 11:00 
AnswerRe: App with Crystal Reports Pin
Ennis Ray Lynch, Jr.28-Jul-09 15:19
Ennis Ray Lynch, Jr.28-Jul-09 15:19 
GeneralRe: App with Crystal Reports Pin
N a v a n e e t h28-Jul-09 15:57
N a v a n e e t h28-Jul-09 15:57 
GeneralAs with anything that seems difficult Pin
Ennis Ray Lynch, Jr.28-Jul-09 16:06
Ennis Ray Lynch, Jr.28-Jul-09 16:06 
GeneralRe: App with Crystal Reports Pin
CodingYoshi29-Jul-09 6:01
CodingYoshi29-Jul-09 6:01 
GeneralRe: App with Crystal Reports Pin
Ennis Ray Lynch, Jr.29-Jul-09 6:04
Ennis Ray Lynch, Jr.29-Jul-09 6:04 
QuestionMono.Cecil (IL Manipulation) : What's OpCode ? Pin
hdv21228-Jul-09 10:55
hdv21228-Jul-09 10:55 
AnswerRe: Mono.Cecil (IL Manipulation) : What's OpCode ? Pin
Curtis Schlak.28-Jul-09 13:50
Curtis Schlak.28-Jul-09 13:50 
QuestionMessage Removed Pin
28-Jul-09 9:10
professionalN_tro_P28-Jul-09 9:10 
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 
djg wrote:
I could use timers or threads, but I try to avoid them.


Timers is debatable, but not using threads (especially with the ease of Background Workers) is a big mistake. Like I have said, running code that will take more than a second (or even less) should not hold up the UI thread, this leads to bad user experience as in most cases the application will appear to crash/freeze and more than likely display the "Not Responding" message, which just makes the application look bad.

When a process is called on the UI thread then the form is not automatically updated until control has been return to it (so to speak). Unless you specifically 'interrupt' the function and tell it to do so.
Try my suggestion of using Refresh after you disable the button (which should be your first two lines within the event BTW) and see if that stops multiple clicks.

And if your counting the number of button clicks during the actual process then you should reset the counter to 1 at the start of each click, otherwise you are storing number of button clicks since form was created. - Sorry, a moment of stupidity D'Oh! | :doh:


I strongly suggest attempting to use a background worker if you have not done so before.

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

modified on Tuesday, July 28, 2009 4:58 PM

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 
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 

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.