Einzelnen Beitrag anzeigen

taktaky
(Gast)

n/a Beiträge
 
#8

Re: Videos mit dem Form Animate1.ResName

  Alt 7. Okt 2007, 00:43
Ich habe einen Code gefunden aber Probleme mit Buttons:
Delphi-Quellcode:
procedure TForm1.MediaPlayer1Click(Sender: TObject; Button: TMPBtnType;
                                  var DoDefault: Boolean);

var s : String;
begin
 With MediaPLayer1 do begin
   //Memo1.Lines.Add('Click ' + TranslateButton(Button)+
   // ' DoDefault:'+IntToStr(Ord(DoDefault)));
   case Button of
     btPlay : begin
                  EnabledButtons := [btPause, btStop, btNext, btPrev];
                  fClickButton := btPlay;
                  fLastCommand := btPlay;
                end;
     btStop : begin
                  EnabledButtons := [btPlay, btNext, btPrev];
                  fClickButton := Button;
                  Rewind; // Without Rewind Stop & Pause have the same effect
                end;
     btNext : begin
                  DoDefault := False;
                  NextSong;
                  PlaySong;
                end;
     btPrev : begin
                  DoDefault := False;
                  PreviousSong;
                  PlaySong;
                end;
     btPause : begin
                  EnabledButtons := [btPause, btStop, btNext, btPrev];
                  fClickButton := btPlay;
                end;
   end;
   Notify := True;
 End;

end;
Quelle

Code:

[delphi]
[Warning] Unit1.pas(7): Unit 'FileCtrl' is specific to a platform
[Error] Unit1.pas(82): Incompatible types: 'TMPBtnType' and 'TUDBtnType'
[Error] Unit1.pas(83): Undeclared identifier: 'fClickButton'
[Error] Unit1.pas(84): Undeclared identifier: 'fLastCommand'
[Error] Unit1.pas(87): Incompatible types: 'TMPBtnType' and 'TUDBtnType'
[Error] Unit1.pas(91): Incompatible types: 'TMPBtnType' and 'TUDBtnType'
[Error] Unit1.pas(93): Undeclared identifier: 'NextSong'
[Error] Unit1.pas(94): Undeclared identifier: 'PlaySong'
[Error] Unit1.pas(96): Incompatible types: 'TMPBtnType' and 'TUDBtnType'
[Error] Unit1.pas(98): Undeclared identifier: 'PreviousSong'
[Error] Unit1.pas(102): Incompatible types: 'TMPBtnType' and 'TUDBtnType'
[Fatal Error] video.dpr(5): Could not compile used unit 'Unit1.pas'
Das Problem ist nicht was die Buttons tun, sondern wie man die Buttons aktiv macht !
MediaPlayer1.EnabledButtons := [btpause,btstop,btPrev,btNext]; // Hilft leider nicht
Miniaturansicht angehängter Grafiken
wmp-buttons-probleme2_123.jpg  
  Mit Zitat antworten Zitat