Threads in Mdi form

G

Guest

Is it possible to use the main form which is the parent form in one thread
and all the other child forms in other threads, all of this in MDI vb.net
windows forms application ?


Thanks in advance,

Smallville
 
A

Armin Zingler

Smallville said:
Is it possible to use the main form which is the parent form in one
thread and all the other child forms in other threads, all of this
in MDI vb.net windows forms application ?


No, if Forms have a child/parent/owner relation to each other, they must run
in the same thread.


Armin
 
H

Herfried K. Wagner [MVP]

Smallville said:
Is it possible to use the main form which is the parent form in one thread
and all the other child forms in other threads, all of this in MDI vb.net
windows forms application ?

No, both the MDI parent and the child forms must run in the same thread.
However, you could span additional threads which perform operations from
within the MDI container or its children.

Multithreading in Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=multithreading&lang=en>
 
G

Guest

Thanks!,
I will try to run one of my methods in another thread instead of running the
child form in another thread.
 
H

Herfried K. Wagner [MVP]

Smallville said:
I will try to run one of my methods in another thread instead of running
the
child form in another thread.

That's a good idea, because it will separate the presentation layer (UI)
from the layer which performs processing.
 
C

Cor Ligthert [MVP]

SmallVille,

I am forever suprised for what people are using multithreading.

Does this mean that the user is typing in something in two forms or
something.

Can you give us an idea in what multithreading helps you in this.

Cor
 

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