D
Defender
Hi All,
This is my first post.
I have written a Windows Form Program (lets call it WFPA) that pops up
another windows form and threads it off (lets call this second form
WFPB). Within WFPB I have a group box. This GroupBox contains several
CheckBoxes. Everything works great.
Now, during run-time, I want to on the fly change the number of
CheckBoxes in WFPB. The instructions to change the number of
CheckBoxes comes from my calling program WFPA.
When I do this I get the following error:
"Controls created on one thread cannot be parented to a control on a
different thread."
It appears that I can only set the number of CheckBoxes in WFPB during
the initial instantiation.
My QUESTION:
How can I allow the WFPA program to update WFPB without causing the
program to invoke an exception?
Regards
Darryl Pike
This is my first post.
I have written a Windows Form Program (lets call it WFPA) that pops up
another windows form and threads it off (lets call this second form
WFPB). Within WFPB I have a group box. This GroupBox contains several
CheckBoxes. Everything works great.
Now, during run-time, I want to on the fly change the number of
CheckBoxes in WFPB. The instructions to change the number of
CheckBoxes comes from my calling program WFPA.
When I do this I get the following error:
"Controls created on one thread cannot be parented to a control on a
different thread."
It appears that I can only set the number of CheckBoxes in WFPB during
the initial instantiation.
My QUESTION:
How can I allow the WFPA program to update WFPB without causing the
program to invoke an exception?
Regards
Darryl Pike