Click here to Skip to main content
15,906,708 members
Home / Discussions / C#
   

C#

 
AnswerRe: Display Image from Path Pin
Christian Graus28-Jul-09 20:10
protectorChristian Graus28-Jul-09 20:10 
AnswerRe: Display Image from Path Pin
Blikkies28-Jul-09 20:14
professionalBlikkies28-Jul-09 20:14 
GeneralRe: Display Image from Path Pin
nudma28-Jul-09 21:15
nudma28-Jul-09 21:15 
GeneralRe: Display Image from Path Pin
Blue_Boy29-Jul-09 0:45
Blue_Boy29-Jul-09 0:45 
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 
Hmmm... very strange process. I assume you have done so just to play around with things.

your code is currently being executed on the UI thread when the button is clicked. This means that until the event process has been complete then the form will not be updated. You can use functions like Update or Refersh (like you have with label1) in order to make a change to the display/layout of the form/control. If you do not do so then it will only occur once the function is complete. So basically, even thou you are disabling the button in the function it will not be applied until the function is complete, but by then you have already enabled the button again.. So no change will be applied. You could try refreshing the button after you disable it and that should work (not tried before thou).

I would recommend that you take a look into Background Workers[^] as these can be used to process longer functions on a separate thread, thus freeing up the form for continued user interaction. There are alos a number of Timer Components[^] you may want to have a look at too.

djg wrote:
if (button1.Enabled == false)
return;


Unless you are planning to 'emulate' the button click by calling the function specifically from code then you should not need to include that code. If you only ever use function when button is clicked by user than this should only ever evaluate to be false anyway

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

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 

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.