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

C#

 
Questionsms messages from asp.net application?? Pin
rohitgraycell5-Jul-06 0:19
rohitgraycell5-Jul-06 0:19 
AnswerRe: sms messages from asp.net application?? Pin
synunn5-Jul-06 0:42
synunn5-Jul-06 0:42 
Questionhow to erase a file content with c# ? Pin
cmpeng345-Jul-06 0:02
cmpeng345-Jul-06 0:02 
AnswerRe: how to erase a file content with c# ? Pin
stancrm5-Jul-06 0:09
stancrm5-Jul-06 0:09 
AnswerRe: how to erase a file content with c# ? Pin
engsrini5-Jul-06 0:13
engsrini5-Jul-06 0:13 
QuestionLoaderLock Exception in .net 2.0 Pin
Waqas Nasir4-Jul-06 23:55
Waqas Nasir4-Jul-06 23:55 
Questiondatagrid problem "windows application" Pin
chandra sagar4-Jul-06 23:46
chandra sagar4-Jul-06 23:46 
QuestionSystem Tray Icon with background processes [modified] Pin
synunn4-Jul-06 23:40
synunn4-Jul-06 23:40 
Hi kids Smile | :)

Background

I'm writing a system service style application. It consists of a NotifyIcon in the sys'tray that has several functions that are called from the ContextMenu/Events.

When the app' starts it should do nothing but sit there until the 'Start Sending' MenuItem's Event is called. This event starts a new Thread which checks a file repository between Thread.Sleep(15*60*1000).

Problem

To cut to the chase, the application is maxing out the cpu usage during a loop:

while(this.Created){<br />
    Application.DoEvents();}


How to I prevent this excesive usage?

Do I need to access the System Idle Process?

This usage doesn't actually halt the server or even slow it down it just capitalizes the usage as there is no other contender for the cpu's attention. I have tried to drop the Thread.Priority to BelowNormal but the applications Thread remains at Normal in Task Manager.

-- modified at 5:41 Wednesday 5th July, 2006
AnswerRe: System Tray Icon with background processes Pin
Guffa5-Jul-06 23:32
Guffa5-Jul-06 23:32 
GeneralRe: System Tray Icon with background processes [modified] Pin
synunn6-Jul-06 6:34
synunn6-Jul-06 6:34 
AnswerRe: System Tray Icon with background processes Pin
Guffa6-Jul-06 11:58
Guffa6-Jul-06 11:58 
QuestionCheck for all installed .net frameworks Pin
code4jigar4-Jul-06 23:11
code4jigar4-Jul-06 23:11 
AnswerRe: Check for all installed .net frameworks Pin
engsrini5-Jul-06 0:17
engsrini5-Jul-06 0:17 
GeneralRe: Check for all installed .net frameworks Pin
code4jigar5-Jul-06 3:16
code4jigar5-Jul-06 3:16 
GeneralRe: Check for all installed .net frameworks Pin
S. Senthil Kumar5-Jul-06 5:10
S. Senthil Kumar5-Jul-06 5:10 
QuestionRe: Check for all installed .net frameworks Pin
code4jigar5-Jul-06 23:10
code4jigar5-Jul-06 23:10 
AnswerRe: Check for all installed .net frameworks Pin
S. Senthil Kumar6-Jul-06 1:48
S. Senthil Kumar6-Jul-06 1:48 
GeneralRe: Check for all installed .net frameworks Pin
code4jigar5-Jul-06 19:50
code4jigar5-Jul-06 19:50 
QuestionAn example on RowFilter Property of DataView object in C# Pin
Alamzeb khan4-Jul-06 22:45
Alamzeb khan4-Jul-06 22:45 
AnswerRe: An example on RowFilter Property of DataView object in C# Pin
led mike5-Jul-06 5:07
led mike5-Jul-06 5:07 
QuestionRowFilter property of DataView object in C# Pin
Alamzeb khan4-Jul-06 22:36
Alamzeb khan4-Jul-06 22:36 
QuestionCalling C# function from Java Pin
ahjiang4-Jul-06 22:31
ahjiang4-Jul-06 22:31 
AnswerRe: Calling C# function from Java Pin
Divyang Mithaiwala4-Jul-06 23:30
Divyang Mithaiwala4-Jul-06 23:30 
AnswerRe: Calling C# function from Java Pin
stancrm5-Jul-06 0:11
stancrm5-Jul-06 0:11 
Questionhow to handle exported function from c++ in C# Pin
Tugberk_Kara4-Jul-06 22:10
Tugberk_Kara4-Jul-06 22:10 

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.