MDI-Forms with thread

  • Thread starter MIchael Ullrich
  • 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
 
A

Armin Zingler

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)
 
F

Fergus Cooney

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
 
C

Cor

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
 
R

Robin Tucker

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.
 
M

Michael Ullrich

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
 
M

Michael Ullrich

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
 
F

Fritz

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
 

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