L
Lars Netzel
I have a ListView in my application. It is populated on Form_Load thru a For
Each Loop and in the loop I add a Button to a cell on each row. This works
perfect.
I have an update button beside the ListView that, when clicked, starts a
new thread that reads thru a bunch of files and emails.. and when this is
done it repopulates the ListView.
But when it's called from this thread it crashes on adding the buttons do
not ask me why but the error is... "Controls created on one thread cannot be
parented to a control on a different thread."
So what I want to do is to NOT repopulate the ListView from this thread but
instead tell the original Thread to populated the ListView.
How can this be done or can I get around this some other way?
/
Lars Netzel
Each Loop and in the loop I add a Button to a cell on each row. This works
perfect.
I have an update button beside the ListView that, when clicked, starts a
new thread that reads thru a bunch of files and emails.. and when this is
done it repopulates the ListView.
But when it's called from this thread it crashes on adding the buttons do
not ask me why but the error is... "Controls created on one thread cannot be
parented to a control on a different thread."
So what I want to do is to NOT repopulate the ListView from this thread but
instead tell the original Thread to populated the ListView.
How can this be done or can I get around this some other way?
/
Lars Netzel