Dialog & top-level forms

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?
 
N

Neno Loje [MVP C#]

Do you pass your desired parent form as the parameter to ShowDialog - e.g.
ShowDialog(this) [resp. ShowDialog(Me) in VB.NET]?

Regards,
 
M

Michael Wong

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!
 

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