c# BGW and create mdi child

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top