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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:32:46+00:00 2026-05-25T15:32:46+00:00

I have 2 winforms, one (call it Form1) contains a background worker, and that

  • 0

I have 2 winforms, one (call it Form1) contains a background worker, and that form opens a second form (Form2). Form1 starts a background worker, and while its working opens Form2 so the user can do something else. When the user is done on Form2 and clicks submit, I want to check if Form1’s background worker is done and if it isn’t pop a message asking the user to wait a minute, else allow the Form2 submit.

How can I check the status of Form1’s background worker from Form2? I looked at this post Check to see if a thread in another form is still running , but my situation is different and I’m not sure how to adapt.

  • 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-25T15:32:47+00:00Added an answer on May 25, 2026 at 3:32 pm

    Check the BackgroundWorker.IsBusy property.

    Edit

    There are various options for making this information available to the second form.

    • You could pass the BackgroundWorker to Form2 on creation. Form2 can then check the IsBusy property.

    • You could create a public property IsRunningBackgroundWork on Form1, and give Form2 a reference to Form1. The getter for this property would check BackgroundWorker.IsBusy.

    • You could create a public property CanSubmit on Form2, and set it from Form1 when the BackgroundWorker completes.

      bgw.RunWorkerCompleted += (s, e) => form2.CanSubmit = true;

    Alternatively (and I think this is best) you could put the submission code in Form1, and just use Form2 as a dialog. Then Form2 doesn’t need to know anything about Form1. Form1 opens Form2 modally, and when Form2 closes, Form1 checks if the worker is finished, and acts accordingly.

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

Sidebar

Related Questions

I have a winforms application. I have a textbox on one form (call F1)
I have a winforms datagridview that seems to always have at least one row
I have a WinForms utility that I use constantly, and enhance regularly. Roughly one
I have a winforms application that doesn't really have a main form - it's
In my C# WinForms program, I have a form that has only a single
I have a WinForms app that contains many NumericUpDown controls. In a nutshell, if
I have a WinForms TreeView with one main node and several sub-nodes. How can
I have a DataGridView with one DataGridViewComboBoxColumn in my WinForms application. I need to
I have a have Winforms client that uses Web services on a IIS7 (W2008)
I have a winforms application that normally is at about 2-4% CPU. We are

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.