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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:59:27+00:00 2026-05-15T05:59:27+00:00

I recognize this may be a duplicate post, but I want to make sure

  • 0

I recognize this may be a duplicate post, but I want to make sure I ask this question clearly and get an answer based on my wording.

I have a collection of forms which inherit from a common visual element: MainVisualForm. This element provides me a way to know when the form is advancing of stepping backwards. What form comes next in the sequence is dependent on user action.

I currently have this code for one such event as I am testing:

form.OnNextForm += (f, ev) =>
            {
                Parameters.Vehicle = ((VehicleForm)f).SelectedVehicle;
                //FormStack.Push(Parameters.Vehicle == Vehicle.SUV
                //                ? new KeyValuePair<Type, IFormActionBehvaior>(typeof(EntertainmentForm), null)
                //                : new KeyValuePair<Type, IFormActionBehvaior>(typeof(ColorForm), null));
            };

This assignment is followed immediately by ShowDialog() which blocks the user until the Dialog form is closed.

The question is:
After the form closes does .NET wait for the EventHandler to complete before running the code which directly follows ShowDialog() or is the handler handled by a different thread?

Thanks very much in advance

  • 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-15T05:59:28+00:00Added an answer on May 15, 2026 at 5:59 am

    Winforms runs in a single thread – in fact you can’t even access it from a second thread without running into trouble. Unless you create a thread yourself (or a BackgroundWorker or anything else that constitutes a thread), you’ll only ever have one thread.

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

Sidebar

Related Questions

Some of you may recognize this as Project Euler's problem number 11. The one
This is a chronological continuation of this question. I have simplified my board so
My professor posted this online for a lab this week, but I missed the
Resharper doesn't recognise Rowtests, is this normal? Is there anyway to fix it? (
My goal is to recognize simple gestures from accelerometers mounted on a sun spot.
Emacs does not recognize my correct Python path. I think it is a general
I'm looking to have windows recognize that certain folders are associated to my application
I have a project to recognize the footprint of animals. It is similar to
What should be the best way to recognize that a number is connected to
Today at work we came across the following code (some of you might recognize

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.