Setting Priority of an App Within the App

  • Thread starter Thread starter Art Krumsee
  • Start date Start date
A

Art Krumsee

Is there a way to lower an application's priority from within the
application itself? I have a vb.net app that's using too much of the CPU
and I'd like to be able to throttle it back some.

Art
 
"> Is there a way to lower an application's priority from within the
application itself? I have a vb.net app that's using too much of the CPU
and I'd like to be able to throttle it back some.
Never used it, so I do'nt know if it works for you
\\\\
Threading.Thread.CurrentThread.Priority =
Threading.ThreadPriority.BelowNormal
////
But you can give it a try
Cor
 
Hi,

Yes, see Herfried's message.

However... You should look at the logic of your code. It sounds like you
are in a loop, polling some sort of "condition." Perhaps there is a more
appropriate technique. Simply changing priority may not be the best way to
tackle the problem.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
Back
Top