this slowpoke moves

Set Priority Process

procedure TForm1.RadioGroup1Click(Sender: TObject);
const Priority : array[0..3] of integer = (IDLE_PRIORITY_CLASS, 
										   NORMAL_PRIORITY_CLASS, 
                                           HIGH_PRIORITY_CLASS, 
                                           REALTIME_PRIORITY_CLASS);
      PLevels  : array[0..3] of byte    = (4, 8, 13, 24);
begin
  SetPriorityClass(GetCurrentProcess, Priority[(Sender as TRadioGroup).Tag]);
  if RadioGroup1.ItemIndex = 0 then begin RadioGroup1.Tag := 0; end;
  if RadioGroup1.ItemIndex = 1 then begin RadioGroup1.Tag := 1; end;
  if RadioGroup1.ItemIndex = 2 then begin RadioGroup1.Tag := 2; end;
  if RadioGroup1.ItemIndex = 3 then begin RadioGroup1.Tag := 3; end;
end;

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate