Solved

Set my programs priority level

Posted on 1997-06-22
2
153 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
2 Comments
 
LVL 1

Accepted Solution

by:
ygolan earned 20 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
calling Tcolordialog in dll make the form disappear 8 112
Delphi XE10, MySQL Query 4 143
Magic Software info 18 131
Twebbrowser in Fire monkey android scrolling to bottom 1 30
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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

777 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