Hi,
I have a query that takes over a minute to execute so I want to put a timer
on the form while its running. Both procedures work individually, but when I
try to create a thread i get this error:
* Additional information: Controls created on one thread cannot be parented
to a control on a different thread.
Which should be the main thread and which should run in the background?
Right now the query is attempting to run in the background but as soon as I
set the table styles for the datagrid;
dgDisplay.TableStyles.Add(dgts)
i receive the error (*). Any suggestions?
Thanks
Paul Henderson - 10 Apr 2006 16:22 GMT
> Additional information: Controls created on one thread cannot be parented
> to a control on a different thread.
>
> Which should be the main thread and which should run in the background?
Assuming you create all your controls in the GUI thread, you should
then be able to execute method calls on them from another thread by
calling the Invoke method on the GUI objects, passing a delegate to the
relevant method you want run.