Re: Long Process
- From: kimiraikkonen <kimiraikkonen85@xxxxxxxxx>
- Date: Wed, 21 May 2008 15:25:38 -0700 (PDT)
On May 22, 1:15 am, Tom Shelton
<tom_shel...@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On 2008-05-21, John Wright <riley_wri...@xxxxxxxxxxx> wrote:
When I do this I get a cross thread error. Any ideas?
John
John,
You can't access any of the forms controls in the actual DoWork event.
You need to handle any updates during your work by calling the
ReportProgress method of the backgroundworker. This will cause the
ProgressChanged event to be raised (assuming you have set the
WorkerReportsProgress property to true). In that event it is safe to
access your forms controls.
--
Tom Shelton
Hi,
Tom is right, and your form elements are getting updated and accessed
during BackgroundWorker's DoWork event, that's why the reason of error
i guess.
Thanks,
Onur Güzel
.
- References:
- Long Process
- From: John Wright
- Re: Long Process
- From: kimiraikkonen
- Re: Long Process
- From: John Wright
- Re: Long Process
- From: Tom Shelton
- Long Process
- Prev by Date: Re: Long Process
- Next by Date: Re: DataView.RowFilter IsNull: DBNull in column of boolean datatype
- Previous by thread: Re: Long Process
- Next by thread: Re: Long Process
- Index(es):
Relevant Pages
|