title: Update label from mainform class with backgroundworker from another class
body: <p>I have two classes.</p>
  
  <pre><code>Public Class MainForm
  
       Private Project As clsProject
  
  
  Private Sub btnDo_Click
     ...
     Backgroundworker.RunWorkerAsync()
  
  End Sub
   Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
  
  
      Project = New clsProject
  
  
  End Sub
  </code></pre>
  
  <p>and two methods inside MainForm</p>
  
  <pre><code> Public Shared Sub setLabelTxt(ByVal text As String, ByVal lbl As Label)
      If lbl.InvokeRequired Then
          lbl.Invoke(New setLabelTxtInvoker(AddressOf setLabelTxt), text, lbl)
      Else
          lbl.Text = text
      End If
  End Sub
  Public Delegate Sub setLabelTxtInvoker(ByVal text As String, ByVal lbl As Label)
  end class
  </code></pre>
  
  <p>I want to update the labels of MainForm from the clsProject constructor.</p>
  
  <pre><code> MainForm.setLabelTxt("Getting prsadasdasdasdasdry..", MainForm.lblProgress)
  </code></pre>
  
  <p>but it does not update them.
  What am I doing wrong?</p>