?
Solved

Set my programs priority level

Posted on 1997-06-22
2
Medium Priority
?
158 Views
Last Modified: 2010-04-04
Hi!

I want to set the priority level of my program, but how.
I would think it would be something like Application.Priority:=Normal.
Thanks!

Chr
0
Comment
Question by:chrb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
ygolan earned 80 total points
ID: 1337447
Chr,

Priorties can be adjusted only per thread. If your application contains only one thread (as most applications do), the following code will do the trick :

SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_NORMAL);

You can replace THREAD_PRIORITY_NORMAL with any of the values documented in the SetThreadPriority function. Some of these values are : THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_HIGHEST      etc.
0
 

Author Comment

by:chrb
ID: 1337448
Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question