Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7700441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:42:33+00:00 2026-05-31T22:42:33+00:00

I have a TextBox in my application, that it is used for showing state

  • 0

I have a TextBox in my application, that it is used for showing state of process. Something like this

for(...)
  textbox.text = "new line \r\n" + textbox.text

Problem is, when it is filling, so no text is visible, just white background. When process is done, then the all added text is visible. Is any option, how do solve this (I need to have text visible during whole process).

Thanks much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:42:35+00:00Added an answer on May 31, 2026 at 10:42 pm

    If it’s winforms, add Application.DoEvents(); in the loop, so that your application can refresh the UI.

    This is the easiest, but not optimum, way to do it.

    EDIT: Someone has downvoted this question without explaining way. That would be fair. The question poster knew about backroundworker and wanted a simpler solution.

    Anyway, this solution can be perfect depending on the nature of the loop. If it’s a loop with lots of iterations with each taking a short time to execute, making a call to Application.DoEvents() will work perfectly. I know it from my own experience. As it’s a loop, it’s quite possible that this is the case. Or perhaps it’s possible to add several DoEvents() inside the loop. It simply checks the windows message queue and attends pending work.

    I don’t see any requisite that the user have to keep working on other parts of the application.

    If it’s a loop with few iterations, and which takes a very long time to execute each, them, it’s neccessary to do it using threading.

    But, rememeber that a novice can make mistakes if he uses threads without knowing very well its implications (I refer to thread-safety). What if the app gets a deadlock? What about corrupting non thread-safe structures used from different threads? What if the user closes the main Window while the background thread hasn’t still finished? Let’s be serious, this tool can be a bomb in unexperienced hands.

    Besides, if you want to use threading BackgroundWorker is not the only solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF application that contains a multiline TextBox that is being used
I have textbox which should be used to send formatted text to remote application,
I have this method with its delegate that is used to append text to
I have a text area in my ASP.NET web application that is used to
In my application I have TextBox in a FormView bound to a LinqDataSource like
Im creating forum like application and I have textbox where users can enter tags
I have a databound TextBox in my application like so: (The type of Height
I have an application that prints eTickets. Originally I used the cool 2-D bar
I have created a User Control in my application that has a textbox and
I have an application in WPF that is to be used exclusively by the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.