c# BGW and create mdi child

  • Thread starter Thread starter mero
  • Start date Start date
M

mero

Hello, i have problem ... I create simple thread and want to create
mdi child, but i have error that this method is not thread-safe. So i
change simple thread to background worker - but now when I create mdi
child by BGW, child window is white and it hang up whole aplication.
What can I do wrong ?

Code:
public void create_children(MDIParent m, string s)
{
formChild.MdiParent = m;
formChild.Text = s;
formChild.Visible = true;
formChild.Show();
}

Also i can add that create children is called when i get message from
net - and geting messages is in while loop ( while isconnected ) -
maybe this is not good for creating mdi child ?
 
Back
Top