Threading

krispaks

Member
Joined
Jan 22, 2007
Messages
17
Programming Experience
1-3
im planning to create a datagridview that will check the database every 5 seconds...

i want to implement it using a timer and inside the timer_tick event handler i will call the method that will check the database... the method will be inside a thread... and i want to return the value to the class itself...

im using a databinding source for the datagridview here...

not that much oriented with threading yet... so im kinda having some problem in implementing this... need some help...
 
Last edited:
You should use a BackgroundWorker. You call its RunWorkerAsync method, do the work in the DoWork event handler and if you need to update the UI afterwards do so from the RunWorkerCompleted event handler.
 
Back
Top