Einzelnen Beitrag anzeigen

Gehstock

Registriert seit: 28. Jan 2006
Ort: Görlitz / Sachsen
489 Beiträge
 
Delphi 2007 Professional
 
#6

Re: Videos mit dem Form Animate1.ResName

  Alt 7. Okt 2007, 00:15
Delphi-Quellcode:
procedure TForm1.maplayerClick(Sender: TObject; Button: TMPBtnType; //all what happens while clicking different mediaplayer buttons
  var DoDefault: Boolean);
begin
dodefault := false;
case button of // when you click .......

btnext: // .. "NEXT" button
   begin
         Timer1.Enabled := false;
         ProgressBar1.Position := 0;
         FileListBox1.ItemIndex := fileListBox1.ItemIndex + 1;
         maplayer.EnabledButtons := [btpause,btstop,btPrev,btNext];
         try
            playmp3(true);
         except;
         end;
   end;

btprev: // .. "PREVIOUS" button
   begin
      Timer1.Enabled := false;
      ProgressBar1.Position := 0;
      FileListBox1.ItemIndex := fileListBox1.ItemIndex - 1;
      maplayer.EnabledButtons := [btpause,btstop,btPrev,btNext];
         try
            playmp3(true);
         except
         end;
   end;

btstop: // .. "STOP" button
   begin
   Timer1.Enabled := false;
   ProgressBar1.Position := 0;
      try
         maplayer.Stop;
         maplayer.EnabledButtons := [btPlay,btPrev,btNext];
      except
      end;
   end;

btpause: // .. "PAUSE" button
   begin
      try
         maplayer.EnabledButtons := [btPlay,btstop,btPrev,btNext];
         maplayer.Pause;
         Timer1.Enabled := false;
      except
      end;
   end;

btplay: // .. "PLAY" button
   begin
    maplayer.EnabledButtons := [btpause,btstop,btPrev,btNext];
    if index_komada = FileListBox1.ItemIndex then
      begin
      if ProgressBar1.Position = 0 then
         begin
            try
               playmp3(true);
               index_komada := FileListBox1.ItemIndex;
            except
            end;
         end
      else
      begin
         try
            maplayer.Play;
            Timer1.Enabled := true;
         except;
         end;
      end;
      end
    else
      try
         playmp3(true);
         index_komada := FileListBox1.ItemIndex;
       except
       end;
    end;
   end;

end;

schonmal die Suchfunktion oder die Hilfe benutzt
Marcel
  Mit Zitat antworten Zitat