Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I assign a value to toolStripStatusLabel1 that is in Form1?
    primarykey
    data
    text
    <p>So I have this code that runs a workerthread and whatnot. I shortened it to show only the necessary parts. In UploaderDoWork I have a text I want toolStripStatusLabel1 to have. How do I assign the value to toolStripStatusLabel1 from there?</p> <pre><code>using Google.GData.Client; using Google.GData.Extensions.MediaRss; using Google.GData.Extensions; using Google.GData.YouTube; using Google.YouTube; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Net; using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography; using System.Text; using System.Threading; using System.Windows.Forms; using System.Windows; using System; using System.Globalization; using System.Resources; using System.Reflection; using System.ComponentModel; namespace Something { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private static BackgroundWorker uploader; static void UploaderDoWork(object sender, DoWorkEventArgs e) { //How do I assign a value to toolStripStatusLabel1, that is in Form1 from here? } private void w() { uploader = new BackgroundWorker { WorkerReportsProgress = true, WorkerSupportsCancellation = true }; uploader.DoWork += UploaderDoWork; uploader.RunWorkerCompleted += delegate { System.Windows.Forms.MessageBox.Show(ursache + " beendet!"); }; uploader.RunWorkerAsync(); } private void button1_Click(object sender, EventArgs e) { w(); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload