Dialog & top-level forms

  • Thread starter Thread starter Michael Wong
  • Start date Start date
M

Michael Wong

Hi there,

I have an application which creates several top-level forms (single
threaded application).

When creating a dialog (with ShowDialog()) on one of them, all other
forms get freezed, which is not the wanted behaviour. Only the form
creating the dialog should get freezed.

Is there any workaround? Should I create one thread for each top-level form?
 
Do you pass your desired parent form as the parameter to ShowDialog - e.g.
ShowDialog(this) [resp. ShowDialog(Me) in VB.NET]?

Regards,
 
Yes, indeed, I passed the parent form, as dlg.ShowDialog(this).

I did some search on Google, and apparently, this is by design.

So now, I am working with multiple threads (each top-level window in its
own thread). It's quite a lot to learn on threading, but it's fun.
Luckily for me, the forms are not very related.

Thanks!
 
Back
Top