Click here to Skip to main content
16,004,969 members
Home / Discussions / C#
   

C#

 
GeneralRe: serializing in client Pin
balkang27-Apr-05 9:36
balkang27-Apr-05 9:36 
GeneralRe: serializing in client Pin
Judah Gabriel Himango27-Apr-05 9:44
sponsorJudah Gabriel Himango27-Apr-05 9:44 
Generalconvert types Pin
eng.mohamed27-Apr-05 0:40
eng.mohamed27-Apr-05 0:40 
GeneralRe: convert types Pin
Colin Angus Mackay27-Apr-05 0:57
Colin Angus Mackay27-Apr-05 0:57 
GeneralRe: convert types Pin
Marc Clifton27-Apr-05 1:02
mvaMarc Clifton27-Apr-05 1:02 
Generalprint a pdf file from a web app Pin
brian5527-Apr-05 0:07
brian5527-Apr-05 0:07 
GeneralRe: print a pdf file from a web app Pin
Dave Kreskowiak27-Apr-05 1:44
mveDave Kreskowiak27-Apr-05 1:44 
Generalbutton click event Pin
gaby2r26-Apr-05 22:48
gaby2r26-Apr-05 22:48 
lets say i have a simple form with a button on it. let button1_Click() be the function binded by the eventhandler delegate.

the problem: i need this function to do a certain task that may take some time. i don't want this to freeze the UI(user interface) however i need to stop any further calls to button1_Click() for the duration of the task. sounds realy easy but to my surprise it's not that easy.

take the following examples of the button1_Click function bodys:
<br />
{<br />
 this.button1.Enabled=false;<br />
 //do task<br />
 this.button1.Enabled=true;<br />
}<br />

visualy disables the button but if you push it (even if disabled) X times the function will execute exactely X times.
<br />
{<br />
 if(this.ignore)<br />
  return;<br />
 this.ignore=true;<br />
 //do task<br />
 this.ignore=false;<br />
}<br />

same as above just that it doesn't visualy disable the button.

ideas, solutions and explanations apreciated.
GeneralRe: button click event Pin
Polis Pilavas26-Apr-05 23:28
Polis Pilavas26-Apr-05 23:28 
GeneralRe: button click event Pin
Anonymous26-Apr-05 23:43
Anonymous26-Apr-05 23:43 
GeneralRe: button click event Pin
S. Senthil Kumar27-Apr-05 1:05
S. Senthil Kumar27-Apr-05 1:05 
GeneralRe: button click event Pin
gaby2r27-Apr-05 1:24
gaby2r27-Apr-05 1:24 
GeneralRe: button click event Pin
S. Senthil Kumar27-Apr-05 3:55
S. Senthil Kumar27-Apr-05 3:55 
GeneralRe: button click event Pin
gaby2r27-Apr-05 4:14
gaby2r27-Apr-05 4:14 
GeneralRe: button click event Pin
Pete O'Hanlon27-Apr-05 4:38
mvePete O'Hanlon27-Apr-05 4:38 
GeneralRe: button click event Pin
gaby2r27-Apr-05 4:46
gaby2r27-Apr-05 4:46 
GeneralRe: button click event Pin
Enishi27-Apr-05 1:27
Enishi27-Apr-05 1:27 
GeneralRe: button click event Pin
gaby2r27-Apr-05 1:51
gaby2r27-Apr-05 1:51 
GeneralRe: button click event Pin
Ashok Dhamija27-Apr-05 3:36
Ashok Dhamija27-Apr-05 3:36 
GeneralSlow application start Pin
fracalifa26-Apr-05 21:36
fracalifa26-Apr-05 21:36 
GeneralRe: Slow application start Pin
Marc Clifton27-Apr-05 1:06
mvaMarc Clifton27-Apr-05 1:06 
GeneralRe: Slow application start Pin
fracalifa27-Apr-05 9:50
fracalifa27-Apr-05 9:50 
GeneralRe: Slow application start Pin
Luis Alonso Ramos27-Apr-05 5:42
Luis Alonso Ramos27-Apr-05 5:42 
GeneralRe: Slow application start Pin
Carl Mercier28-Apr-05 2:09
Carl Mercier28-Apr-05 2:09 
Generalsqldatareader Pin
sianatia26-Apr-05 21:23
sianatia26-Apr-05 21:23 

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.