Click here to Skip to main content
16,011,949 members
Home / Discussions / C#
   

C#

 
GeneralRe: Quiz Application In c#.net Pin
varun.g5-Jan-11 16:48
varun.g5-Jan-11 16:48 
QuestionbackgroundWorker Pin
arkiboys4-Jan-11 22:34
arkiboys4-Jan-11 22:34 
AnswerRe: backgroundWorker Pin
JF20154-Jan-11 22:39
JF20154-Jan-11 22:39 
AnswerRe: backgroundWorker Pin
Pete O'Hanlon4-Jan-11 22:41
mvePete O'Hanlon4-Jan-11 22:41 
GeneralRe: backgroundWorker Pin
arkiboys4-Jan-11 23:17
arkiboys4-Jan-11 23:17 
GeneralRe: backgroundWorker Pin
Pete O'Hanlon4-Jan-11 23:32
mvePete O'Hanlon4-Jan-11 23:32 
GeneralRe: backgroundWorker Pin
arkiboys4-Jan-11 23:44
arkiboys4-Jan-11 23:44 
GeneralRe: backgroundWorker Pin
DaveyM695-Jan-11 0:55
professionalDaveyM695-Jan-11 0:55 
The checking can be done on the background thread which the DoWork event is called on and any updates to the UI can be done by reporting progress.

Two problems here:
Once the DoWork handler method returns then the RunWorkerCompleted event fires and the thread will be closed so you would either need to a. Ensure the DoWork handler never returns or b. start a new BackgroundWorker/restart from the RunWorkerCompleted handler. This is why Pete suggested a timer as it can raise an event on a background thread periodically for you.

The background thread is going to be chewing up processor cycles if you just loop in your DoWork handler - this isn't a good idea! Sleeping the thread on each loop may be a quick solution to this - but still a timer makes more sense.
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: backgroundWorker Pin
arkiboys5-Jan-11 1:08
arkiboys5-Jan-11 1:08 
Questionhow to fire form_activated event in MDI Child Form... Pin
Manish_Kumar_Nayak4-Jan-11 21:27
Manish_Kumar_Nayak4-Jan-11 21:27 
AnswerRe: how to fire form_activated event in MDI Child Form... Pin
Eddy Vluggen5-Jan-11 0:09
professionalEddy Vluggen5-Jan-11 0:09 
QuestionSimple Unzip of zip file containing multiple files and folders [modified] Pin
arun_pk4-Jan-11 19:46
arun_pk4-Jan-11 19:46 
AnswerRe: Simple Unzip of files Pin
Hiren solanki4-Jan-11 19:50
Hiren solanki4-Jan-11 19:50 
GeneralRe: Simple Unzip of files Pin
arun_pk4-Jan-11 19:55
arun_pk4-Jan-11 19:55 
AnswerRe: Simple Unzip of files Pin
Hiren solanki4-Jan-11 19:57
Hiren solanki4-Jan-11 19:57 
GeneralRe: Simple Unzip of files Pin
arun_pk4-Jan-11 19:58
arun_pk4-Jan-11 19:58 
AnswerRe: Simple Unzip of zip file containing multiple files and folders Pin
ManOFTheMatcH4-Jan-11 20:03
ManOFTheMatcH4-Jan-11 20:03 
AnswerRe: Simple Unzip of zip file containing multiple files and folders Pin
RaviRanjanKr4-Jan-11 21:29
professionalRaviRanjanKr4-Jan-11 21:29 
GeneralRe: Simple Unzip of zip file containing multiple files and folders Pin
arun_pk4-Jan-11 22:27
arun_pk4-Jan-11 22:27 
GeneralRe: Simple Unzip of zip file containing multiple files and folders Pin
RaviRanjanKr4-Jan-11 23:37
professionalRaviRanjanKr4-Jan-11 23:37 
QuestionMessage Removed Pin
4-Jan-11 19:34
Sharath Hanakere4-Jan-11 19:34 
AnswerRe: Create a Sitemap User Control by using Recursion Pin
OriginalGriff4-Jan-11 20:36
mveOriginalGriff4-Jan-11 20:36 
GeneralRe: Create a Sitemap User Control by using Recursion Pin
Sharath Hanakere4-Jan-11 20:55
Sharath Hanakere4-Jan-11 20:55 
GeneralRe: Create a Sitemap User Control by using Recursion Pin
OriginalGriff4-Jan-11 20:57
mveOriginalGriff4-Jan-11 20:57 
GeneralMessage Removed Pin
4-Jan-11 22:12
Sharath Hanakere4-Jan-11 22:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.