MDI-Forms with thread

  • Thread starter Thread starter MIchael Ullrich
  • Start date Start date
M

MIchael Ullrich

Hello,

I have a application which could create 1 to 5 mdi-child-forms.
Each childform should have it`s own thread - like a chat-application.
How can I do this?

Bye

Mike
 
MIchael Ullrich said:
I have a application which could create 1 to 5 mdi-child-forms.
Each childform should have it`s own thread - like a
chat-application. How can I do this?

It can not be done because windows that have a child<->parent relation must
run in the same thread. (AFAIR)
 
Hi Mike,

Threading may or may not be the best solution. One thread per Form may or
may not be the best solution. It might be useful to tell us more about what
these Forms are going to do. To use your example - chats - there might be
several going on in parallel, but they might be implemented in a single
threaded manner, or they might share a thread or two for part of their work.

Regards,
Fergus
 
Hi Michael,

As addition to Armin,

Why should you do that, is the one who is chatting typing text with 5
keyboards in one time (and even than there is no reason for that because the
delay is to high)

I am curious about the reason?

Cor
 
Although each child window must run on the parent thread, there is nothing
to stop you creating a component which is added to each window that
communicates with its own worker thread.
 
Hi,

actually in each child-form a self-written script interpreter is
running.
The interpreter starts with creation of the child-form.
But when I open three or more child-forms only the last one ist working,
and the other ones are pauusing until the task of the last one is
finished.
But I need all the forms run at the same time.

Bye

Mike
 
Hi,

actually in each child-form runs a self-written script-interpreter which
works throuh a script (takes aprox. 20-60sec.)
In the meantime I want to start other child-forms which run the same
interpreter at the same time.
Right now only the last form is running and the other ones are paused.

Bye

Mike
 
Hi,

actually I have a childform, which runs a self-written script
interpreter (1 script runs aprox. 1 min).
I want to create more child-forms and I want to have the interpreters
run parallel.
Right now only the interpreter of the form created last is running until
it is finished and then the other ones are continuing.

How can I make parallel working child-forms

bye

Mike
 
Back
Top