Hi misters,
I have winForm that needs update Panel (add controls to Panel of
SplitContainer dynamically).
I have a Backgroundworker, and DoWork event I want to add controls but I get
this error in Spanish (I don't get translation: Los controles creados en un
subproceso no pueden tener controles primarios en un control en un subproceso
diferente.)
CheckForIllegalCrossThreadCalls = False; /* !!!! */
Me.bgCargaFichero.WorkerReportsProgress = True;
Me.bgCargaFichero.WorkerSupportsCancellation = True;
Me.bgCargaFichero.RunWorkerAsync();
Private bgCargaFichero_DoWork(...) //Handles bgCargaFichero.DoWork
{
SplitContainer1.Panel1.SuspendLayout();
for ...
{
SplitContainer1.Panel1.Controls.Add(contenedorPagi na);
}
SplitContainer1.Panel1.ResumeLayout(False);
If bgCargaFichero.CancellationPending = True
e.Cancel = True;
else
e.Result = True;
}
Can I add controls to a Panel from another process ??
Thanks in advance. Greetings
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft