Click here to Skip to main content
15,889,808 members
Home / Discussions / C#
   

C#

 
QuestionMSI Database Functions in C# Pin
CyberTech3-May-07 7:55
CyberTech3-May-07 7:55 
QuestionHow to add user to the folder? Pin
Dotnetkanna3-May-07 6:55
Dotnetkanna3-May-07 6:55 
AnswerRe: How to add user to the folder? Pin
Tarakeshwar Reddy3-May-07 7:21
professionalTarakeshwar Reddy3-May-07 7:21 
QuestionKnown issues with WebBrowser control? Pin
engsrini3-May-07 5:46
engsrini3-May-07 5:46 
AnswerRe: Known issues with WebBrowser control? Pin
PIEBALDconsult3-May-07 8:05
mvePIEBALDconsult3-May-07 8:05 
QuestionDeveloping Mobile Phone Applications using C# Pin
Nadia Monalisa3-May-07 4:46
Nadia Monalisa3-May-07 4:46 
AnswerRe: Developing Mobile Phone Applications using C# Pin
Dave Kreskowiak3-May-07 4:54
mveDave Kreskowiak3-May-07 4:54 
QuestionButton.Text has no effect? Pin
User 66583-May-07 4:37
User 66583-May-07 4:37 
Hi
I'm struggling with a strange problem here, I can't set the text of a button in some circumstances.
Here's my code:

private void btnGo_Click(object sender, EventArgs e)
{
  try
  {
      btnGo.Text = "Processing..."; // this one doesn't work
      
      // blocking operation that might fail
   }
   catch (...)
   finally
   {
      btnGo.Text = "Start"; // this one works
   }
}


If I remove btnGo.Text = "Start", then the text "Processing" shows up once the long operation has finished.

/edit: I solved it by calling btnGo.Refresh() after btnGo.Text. But why is this necessary, will the button repaint itself only after another Paint-Event occured?

Does anyone know what might be causing this strange behaviour?

regards

modified 12-Sep-18 21:01pm.

AnswerRe: Button.Text has no effect? Pin
Sandeep Akhare3-May-07 4:43
Sandeep Akhare3-May-07 4:43 
AnswerRe: Button.Text has no effect? Pin
Dave Kreskowiak3-May-07 4:53
mveDave Kreskowiak3-May-07 4:53 
GeneralRe: Button.Text has no effect? Pin
Sandeep Akhare3-May-07 5:08
Sandeep Akhare3-May-07 5:08 
GeneralRe: Button.Text has no effect? Pin
Dave Kreskowiak3-May-07 5:35
mveDave Kreskowiak3-May-07 5:35 
GeneralRe: Button.Text has no effect? Pin
User 66583-May-07 6:13
User 66583-May-07 6:13 
GeneralRe: Button.Text has no effect? Pin
Dave Kreskowiak3-May-07 6:57
mveDave Kreskowiak3-May-07 6:57 
AnswerRe: Button.Text has no effect? Pin
MoustafaS3-May-07 6:15
MoustafaS3-May-07 6:15 
AnswerRe: Button.Text has no effect? Pin
Stefan Prodan3-May-07 12:05
Stefan Prodan3-May-07 12:05 
QuestionConcept of Thread.BeginCriticalRegion() Pin
Sandeep Akhare3-May-07 4:28
Sandeep Akhare3-May-07 4:28 
AnswerRe: Concept of Thread.BeginCriticalRegion() Pin
Jimmanuel3-May-07 5:42
Jimmanuel3-May-07 5:42 
GeneralRe: Concept of Thread.BeginCriticalRegion() Pin
Sandeep Akhare3-May-07 19:55
Sandeep Akhare3-May-07 19:55 
GeneralRe: Concept of Thread.BeginCriticalRegion() Pin
Jimmanuel4-May-07 3:26
Jimmanuel4-May-07 3:26 
AnswerRe: Concept of Thread.BeginCriticalRegion() Pin
pbraun3-May-07 8:34
pbraun3-May-07 8:34 
GeneralRe: Concept of Thread.BeginCriticalRegion() Pin
Sandeep Akhare4-May-07 2:32
Sandeep Akhare4-May-07 2:32 
GeneralRe: Concept of Thread.BeginCriticalRegion() Pin
Stefan Prodan3-May-07 12:13
Stefan Prodan3-May-07 12:13 
AnswerRe: Encrtpy a DataTable/DataSet served by a WebService in VS2005/C# Pin
Andre Vianna4-May-07 4:16
Andre Vianna4-May-07 4:16 
QuestionProperties window - when are the properties used? Pin
microslav3-May-07 4:20
microslav3-May-07 4:20 

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.