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

C#

 
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 
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 
hi thanks for your quick reply. i have tried the code, but unfortunately it does not work. if you click the button twice within two seconds, you would hear two beeps meaning that the event has been fired, even though the second click was on a disabled button

this is a very strange issue, i guess the event queue is not cleared. if one does not enable the button at the end of the function, only one event will occur. for instance the following has the same consequences:

private void button1_Click(object sender, EventArgs e)
{
button1.Enabled = false;
timer1.Enabled = true;
}

private void timer1_Tick(object sender, EventArgs e)
{
timer1.Enabled = false;
System.Console.Beep();
Thread.Sleep(2000); // could be a blocking function
button1.Enabled = true;

}

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

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.