Einzelnen Beitrag anzeigen

DRPEnc

Registriert seit: 20. Feb 2004
Ort: Noch unterm Mond
126 Beiträge
 
#21

Re: Process Priorität setzen - als Variable...

  Alt 19. Mär 2004, 22:35
Irgendwie nicht...

Könntest du die Source ggf. umschreiben, damit ich weis was ich falsch gemacht hatte?

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
ComboBox1.Style:=csDropDownList;
ComboBox1.Items.AddObject('Idle Priorität',TObject(IDLE_PRIORITY_CLASS));
ComboBox1.Items.AddObject('Normale Priorität',TObject(NORMAL_PRIORITY_CLASS));
ComboBox1.Items.AddObject('High Priorität',TObject(HIGH_PRIORITY_CLASS));
end;
Delphi-Quellcode:
ProcID := 0;
RunProcess('Test.bat', SW_SHOW, True, @ProcID, Cardinal(ComboBox1.Items.Objects[ComboBox1.ItemIndex]) );
end;

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if form1.ComboBox1.ItemIndex=0 then form1.Edit1.Text:='IDLE';
if form1.ComboBox1.ItemIndex=1 then form1.Edit1.Text:='NORMAL';
if form1.ComboBox1.ItemIndex=2 then form1.Edit1.Text:='HIGH';
end;
Es bleibt immer NORMAL...
CU

DRPEnc
  Mit Zitat antworten Zitat