M
Mike
I have the following scenario that I'm not quite sure how to implement.
I have a form called frmMain that it's a MDI container, and a form
called frmChild, which some instances of it will be contained in
frmMain.
I also have a procedure called DoSomething that fires in the LOAD event
of frmMain, by the way, it is lunched in its own thread other than the
thread were frmMain was created.
I do this because this procedure (DoSomething) it's a beast (it uses a
lot of CPU resources).
Inside DoSomething, some stuff will happen that will require an instance
of frmChild to be generated and of course it will be contained inside
frmMain.
While DoSomething runs, several instances of frmChild might be
generated.
My problem happens when I try to instantiate a frmChild object, and
declaring its Parent property equal to frmMain, because the complier
says I'm doing this in an unsafe manner, trying to access a form from a
thread other than the one it was created on.
I need a solution for this, it might be a solution for the compiler's
exception, or another since you already now what I'm trying to
accomplish.
I really appreciate it.
Later!
I have a form called frmMain that it's a MDI container, and a form
called frmChild, which some instances of it will be contained in
frmMain.
I also have a procedure called DoSomething that fires in the LOAD event
of frmMain, by the way, it is lunched in its own thread other than the
thread were frmMain was created.
I do this because this procedure (DoSomething) it's a beast (it uses a
lot of CPU resources).
Inside DoSomething, some stuff will happen that will require an instance
of frmChild to be generated and of course it will be contained inside
frmMain.
While DoSomething runs, several instances of frmChild might be
generated.
My problem happens when I try to instantiate a frmChild object, and
declaring its Parent property equal to frmMain, because the complier
says I'm doing this in an unsafe manner, trying to access a form from a
thread other than the one it was created on.
I need a solution for this, it might be a solution for the compiler's
exception, or another since you already now what I'm trying to
accomplish.
I really appreciate it.
Later!