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 3677958
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:17:02+00:00 2026-05-19T03:17:02+00:00

Once i launch a win forms application, i create a background worker to do

  • 0

Once i launch a win forms application, i create a background worker to do some initialization. While this initialization happens, i want all the buttons in the form to stay disabled.

I was thinking whats the best way to do this. One straightforward approach i could think of is setting a flag in the thread’s completed event. Is there any other better approach?

  • 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-19T03:17:03+00:00Added an answer on May 19, 2026 at 3:17 am

    In cases like this I typically put the controls into a Panel, disable the panel when the background process is started, and then enable it again when the work is done. This way you don’t need to keep track of the Enabled state for each individual control. Disbling the panel and starting the background worker can be done in the form’s Load event handler (or OnLoad override, depending on your coding style).

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

Sidebar

Related Questions

Every once in a while, but especially prevalent on Facebook, Opera Mini will exhibit
I want to require_once() dbconnect.php in register.php . How do I do that? I
I'd like a post request to be sent once a certain text input field
I'm trying to document several similar functions at once using Doxygen groups. I would
Update: It's not really necessary to remove added scripts considering once they run you
Are there any solutions to upload multiple files at once without flash? :) Not
Is it possible to declare that a column in MySQL should be unmodifiable once
Via Google Mock's Return() you can return what value will be returned once a
I am trying to implement functionality wherein an attribute, once set, cannot be changed
I have a Windows program with the following flow: generated config file -> user

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.