Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
AnswerRe: Backgroundworker Pin
Pete O'Hanlon10-Mar-11 23:25
mvePete O'Hanlon10-Mar-11 23:25 
GeneralRe: Backgroundworker Pin
arkiboys10-Mar-11 23:31
arkiboys10-Mar-11 23:31 
GeneralRe: Backgroundworker Pin
Luc Pattyn11-Mar-11 0:55
sitebuilderLuc Pattyn11-Mar-11 0:55 
GeneralRe: Backgroundworker Pin
Pete O'Hanlon11-Mar-11 1:04
mvePete O'Hanlon11-Mar-11 1:04 
GeneralRe: Backgroundworker Pin
arkiboys11-Mar-11 1:16
arkiboys11-Mar-11 1:16 
GeneralRe: Backgroundworker Pin
SledgeHammer0111-Mar-11 6:35
SledgeHammer0111-Mar-11 6:35 
AnswerRe: Backgroundworker Pin
Geoff Williams10-Mar-11 23:34
Geoff Williams10-Mar-11 23:34 
GeneralRe: Backgroundworker Pin
arkiboys10-Mar-11 23:40
arkiboys10-Mar-11 23:40 
Do you mean like this?

private System.Timers.Timer timerStatus = new System.Timers.Timer(200);
Initialize()
{
_backgroundWorker = new BackgroundWorker();
_backgroundWorker.WorkerSupportsCancellation = true;
_backgroundWorker.WorkerReportsProgress = true;
_backgroundWorker.DoWork += new DoWorkEventHandler(BackgroundWorker_DoWork);
_backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_backgroundWorker_RunWorkerCompleted);

timerStatus.Elapsed += new System.Timers.ElapsedEventHandler(OnElapsedTimeStatus);
timerStatus.Enabled = true;
}

private void OnElapsedTimeStatus(object source, System.Timers.ElapsedEventArgs e)
        {
            _backgroundWorker.RunWorkerAsync();            
        }

private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            if (_backgroundWorker.CancellationPending)
            {
                e.Cancel = true;
                return;
            }
                        
            MonitorStatus(); //gets called every 200ms
        } 

GeneralRe: Backgroundworker Pin
Geoff Williams10-Mar-11 23:42
Geoff Williams10-Mar-11 23:42 
GeneralRe: Backgroundworker Pin
arkiboys11-Mar-11 0:04
arkiboys11-Mar-11 0:04 
GeneralRe: Backgroundworker Pin
Geoff Williams11-Mar-11 0:15
Geoff Williams11-Mar-11 0:15 
GeneralRe: Backgroundworker Pin
arkiboys11-Mar-11 0:42
arkiboys11-Mar-11 0:42 
QuestionIntegrate WebCam in ASPX Pin
The_Collector10-Mar-11 16:24
The_Collector10-Mar-11 16:24 
AnswerRe: Integrate WebCam in ASPX Pin
Pravin Patil, Mumbai10-Mar-11 20:38
Pravin Patil, Mumbai10-Mar-11 20:38 
GeneralRe: Integrate WebCam in ASPX Pin
The_Collector10-Mar-11 20:58
The_Collector10-Mar-11 20:58 
GeneralRe: Integrate WebCam in ASPX Pin
Richard MacCutchan10-Mar-11 22:42
mveRichard MacCutchan10-Mar-11 22:42 
GeneralRe: Integrate WebCam in ASPX Pin
The_Collector11-Mar-11 15:04
The_Collector11-Mar-11 15:04 
GeneralRe: Integrate WebCam in ASPX Pin
Richard MacCutchan11-Mar-11 21:52
mveRichard MacCutchan11-Mar-11 21:52 
GeneralRe: Integrate WebCam in ASPX Pin
The_Collector11-Mar-11 22:33
The_Collector11-Mar-11 22:33 
GeneralRe: Integrate WebCam in ASPX Pin
The_Collector11-Mar-11 22:33
The_Collector11-Mar-11 22:33 
GeneralRe: Integrate WebCam in ASPX Pin
Richard MacCutchan11-Mar-11 23:08
mveRichard MacCutchan11-Mar-11 23:08 
GeneralRe: Integrate WebCam in ASPX Pin
The_Collector12-Mar-11 2:06
The_Collector12-Mar-11 2:06 
GeneralRe: Integrate WebCam in ASPX Pin
Richard MacCutchan12-Mar-11 2:36
mveRichard MacCutchan12-Mar-11 2:36 
GeneralRe: Integrate WebCam in ASPX Pin
The_Collector13-Mar-11 18:09
The_Collector13-Mar-11 18:09 
GeneralRe: Integrate WebCam in ASPX Pin
Richard MacCutchan13-Mar-11 22:53
mveRichard MacCutchan13-Mar-11 22:53 

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.