Mega Code Archive

 
Categories / Delphi / Examples
 

How to change the priority of applications main thread

Title: How to change the priority of applications main thread procedure TForm1.Button1Click(Sender: TObject); var MainThread: THandle; begin MainThread := GetCurrentThread; SetThreadPriority(MainThread, THREAD_PRIORITY_HIGHEST); end;