Yes, it does compile! But it didn't seem to help much.
I also go the other code (shown above) to work, and it seems to have some effect.
I was wondering how changing the priority of the main application thread in my program differs from doing it externally through Task Manager.
My program does seem to cooperate better with Firefox running a Java program like jigzone.com jigsaw puzzles ( for instance ).
However, I still have to have those Application.Process Messages in the code to get the scheme to work.
I've tried sleep calls in other programs and they don't seem to work as well as altering the priority.
Maybe someone else can benefit from my experience.
Here is what I have in there now:
interface
uses
Classes, SysUtils, FileUtil, LResources,
Forms, Controls, Graphics, Dialogs,
Menus, StdCtrls, SynEdit, ComCtrls,
LCLType,
JwaWinBase,
LazThread,
...
procedure TMainForm.FormCreate(Sender: TObject);
var
CreateStatus : Boolean;
MainThread : THandle;
...
begin
MainThread := GetCurrentThreadID;
SetThreadPriority(MainThread, THREAD_PRIORITY_LOWEST);
// Tried this, didn't seem to work as well, or maybe not at all.
//ThreadSetPriority(GetCurrentThreadId,-15);
...