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

The Archive Base Latest Questions

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

In my windows application i have a usercontrol, which in turn host few other

  • 0

In my windows application i have a usercontrol, which in turn host few other usercontrols.

Just before the end of the main user control’s constructor, i try to create a thread… but it does not appear to be created:

mainUserControl() {    var t=new Thread(ThreadJob);    t.IsBackground=true;    t.Start(); }   private void ThreadJob()  {    //Thread.Sleep(120000);    //if(txtStatus.InvokeRequired) {    //  txtStatus.Invoke(new MethodInvoker(delegate { txtStatus.Text='Thread started'; }));    //}     txtStatus.Text='sample';  } 

This code does not work: i take this as evidence that the thread is not spawned, as if it were then txtStatus.Text='sample'; would have thrown an exception…. right?

So what’s happening here? Why isn’t my thread being created?

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

    My guess is, since you took out your delay, the thread is spawning, setting the value, and shutting down.

    Accessing txtStatus.Text from the wrong thread is not guaranteed to throw, though. There are situations where you can access a property on a control from a background thread and it will not throw. (You still shouldn’t do it, though!)

    If you still believe the thread is not starting, you could try setting a breakpoint there – I’m fairly certain you’ll see that it’s hitting that point.

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

Sidebar

Related Questions

I am working on Windows Phone 7.1 application. I have a UserControl which has
I have a few UserControls in my application which I need to support dragging
I have a windows phone application and I need to add a user control
I have a growing application with multiple usercontrols, windows, etc that all send a
I have a user control UserControl which is in an assembly Assembly. I have
In a Windows Form application I have a Form with a UserControl that contains
Greetings I have a Main Window which will hold multiple User Controls. I will
In WPF application I have MainWindow : Window which loads a POSView : UserControl
I have a Windows Mobile application in which I want to check the device
I have a scenario. (Windows Forms, C#, .NET) There is a main form which

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.