.net - Setting priority on console applications -


is there way start console application low priority?
have forms-application running on windows mobile 6.5 (.net cf 2.0) calls console application this:

dim myprocess new processstartinfo() myprocess.filename = "myprocess.exe" myprocess.arguments = "myarguments" myprocess.useshellexecute = false process.start(myprocess) 


how set priority of process after starting it?

system.diagnostics.processpriorityclass indicates priority system associates process. value, priority value of each thread of process, determines each thread's base priority level.

belownormal specifies process has priority above idle below normal.

invoke before load form or anywhere want change process priority.

dim myprocess system.diagnostics.process = _     system.diagnostics.process.getcurrentprocess() myprocess.priorityclass = system.diagnostics.processpriorityclass.belownormal 

update

.net compact framework 2.0 supports threading can set thread priority. off top of head.

imports system.threading      dim yourthread thread     yourthread = new thread(addressof threadtask)     yourthread.start()     yourthread.priority = threadpriority.belownormal  private sub threadtask()        'whatever want  end sub 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

angularjs - ng-repeat duplicating items after page reload -

javascript - What's causing this slow/delayed audio playback in Safari? -