A code snippet would be to large, but it is easy to reproduce. Go get the
threading quickstart for the compact framework...
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/controlinvoker.aspx
Download the C# code and make a project/solution for it. Build and run. It
runs great.
Now add a new form that will be your main window. Add two buttons "Modal"
and "Modeless". Implement the buttons' Click() event methods as follows...
private void btnModal_Click(object sender, System.EventArgs e)
{
ControlInvokerSample.Form1 dialog = new ControlInvokerSample.Form1();
dialog.ShowDialog();
}
private void btnModless_Click(object sender, System.EventArgs e)
{
ControlInvokerSample.Form1 dialog = new ControlInvokerSample.Form1();
dialog.Show();
}
Next change Main() to load the new form as the main window (instead of the
CountDown form). Build and run. If you click the Modeless button every thing
works. If you click the Modal button the thread stalls.
Thanks again,
-jim