Einzelnen Beitrag anzeigen

Marcasso

Registriert seit: 16. Sep 2006
39 Beiträge
 
#10

Re: Pfad aus ListBox für Bass.dll auslesen

  Alt 8. Dez 2006, 12:51
vor und zurück habe ich jetz so abgeändert, dass das programm nicht mehr abstürtzt. scheint so auch prima zu funktioneren...

vor
Delphi-Quellcode:
procedure TForm1.vorClick(Sender: TObject);
var pfad:string;
begin
  if (form2.ListA.Count <> 0) and (form2.ListA.ItemIndex <> -1) then
    begin
      if form2.ListA.ItemIndex = form2.ListA.Count -1 then
        form2.ListA.ItemIndex := 0
      else
        if form2.ListA.ItemIndex <> form2.ListA.Count-1 then
          form2.ListA.ItemIndex := form2.ListA.ItemIndex+1;
        form2.ListB.ItemIndex := form2.ListA.ItemIndex;
      end
    else
      if form2.ListA.ItemIndex = -1 then
        begin
          form2.ListA.ItemIndex := 0;
          form2.ListB.ItemIndex := form2.ListA.ItemIndex;
        end;
  procedures.MPPlay(true);
end;
zurück
Delphi-Quellcode:
procedure TForm1.rueckClick(Sender: TObject);
var pfad:string;
begin
  if form2.ListA.Count <> 0 then
    if form2.ListA.ItemIndex = 0 then
      form2.ListA.ItemIndex := form2.ListA.Count -1
    else
      if form2.ListA.ItemIndex <> 0 then
        form2.ListA.ItemIndex := form2.ListA.ItemIndex -1;
    form2.ListB.ItemIndex := form2.ListA.ItemIndex;
   if form2.ListA.ItemIndex = -1 then
   begin
     form2.ListA.ItemIndex:=0;
     form2.ListB.ItemIndex:=form2.ListA.ItemIndex;
   end;
  procedures.MPPlay(true);
end;
  Mit Zitat antworten Zitat