I have a form with a backgroundworker
when I click a button the backgroundworker starts with this code:
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
M_Results m_Results = new M_Results();
this.Controls.Add(m_Results);
m_Results.Location = new Point(0, 0);
m_Results.Visible = true;
}
in the user control Im trying to reporteprogress from the backgroundworker, what Ive done is:
BackgroundWorker bgWorker;
public Results()
{
Form mainform = this.Parent as Form;
bgWorker = Padre.Controls["backgroundWorker"] as BackgroundWorker;
InitializeComponent();
Inicializartablas();
Formatotablas();
}
but I get error that I cant convert Form.control to backgroundworker.
thank you
Carlos