AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi MediaPlayer, NoNotify anfangen
Thema durchsuchen
Ansicht
Themen-Optionen

MediaPlayer, NoNotify anfangen

Offene Frage von "marc.beeh"
Ein Thema von marc.beeh · begonnen am 15. Jul 2005 · letzter Beitrag vom 15. Jul 2005
 
Benutzerbild von marc.beeh
marc.beeh

Registriert seit: 16. Dez 2003
Ort: Rodgau
47 Beiträge
 
Delphi 7 Enterprise
 
#5

Re: MediaPlayer, NoNotify anfangen

  Alt 15. Jul 2005, 12:35
Ok, ist leider im Moment alle nocht nicht so elegant umgesetzt...

Delphi-Quellcode:
procedure TForm1.Spiel(dname: string); //Spielt Datei "dname" ab
begin
with MediaPlayer1 do
  begin
  If Mode = mpOpen then close;
  FileName := dname;
  if CheckBox1.Checked then Display:=Panel1
   else Display := nil;
  DisplayRect:=Panel1.ClientRect;
  Open;
  Play;
  playing := true;
end;
end;
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject); //Dateiauswahl
begin
if opendialog1.Execute then
 if (ExtractFileExt(Opendialog1.FileName) = '.m3u') then
 begin
 ListBox1.Items.LoadFromFile(Opendialog1.FileName);
 ListBox1.Visible := true;
 ShellTreeView1.Visible := false;
 ListBox1.ItemIndex := 0;
 spiel(listbox1.Items.Strings[listbox1.ItemIndex]);
 MediaPlayer1.Notify := true;
 playlist := true;
 end
 else Spiel(Opendialog1.FileName);
end;
Delphi-Quellcode:
Procedure TForm1.MediaPlayer1Notify(Sender: TObject);
var
a: integer;
begin
if NoNotify then
  begin
  NoNotify := false;
  exit;
  end
  else
  with listbox1 do
  if (ItemIndex <= Count) and playlist then
    begin
    a := ItemIndex;
    itemindex := a + 1;
    Spiel(Items.Strings[ItemIndex]);
    MediaPlayer1.Notify := true;
    end;
end;

Delphi-Quellcode:
procedure TForm1.MediaPlayer1Click(Sender: TObject; Button: TMPBtnType;
  var DoDefault: Boolean); //Abfrage der Button
var
a: integer;
begin
if (button = MPlayer.btNext) and playlist then
  with listbox1 do
    begin
    NoNotify := true;
    a := ItemIndex;
    itemindex := a + 1;
    Spiel(Items.Strings[ItemIndex]);
    NoNotify := true;
    end;

if (button = MPlayer.btPrev) and playlist then
  with listbox1 do
    begin
    NoNotify := true;
    a := ItemIndex;
    itemindex := a - 1;
    Spiel(Items.Strings[ItemIndex]);
    NoNotify := true;
    end;
end;
If there isn´t what you need, develop it...
(Und dazu brauche ich jetzt eure Hilfe! )
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:31 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz