Sabtu, 26 Desember 2015
Mp3 Sederhana
procedure TForm2.Button1Click(Sender: TObject);
begin
OpenDialog1.Execute;
if OpenDialog1.Files.Count > 0 then begin
if ExtractFileExt(OpenDialog1.FileName) = '.mp3' then
begin
MediaPlayer1.FileName := OpenDialog1.FileName ;
MediaPlayer1.Open ;
Button2.Enabled := true ;
Button3.Enabled := true ;
end else
begin
Button2.Enabled := false ;
Button3.Enabled := false ;
end;
end else begin
Button2.Enabled := false ;
Button3.Enabled := false ;
end;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Button1.Caption := 'Open' ;
Button2.Caption := 'Play' ;
Button3.Caption := 'Pause' ;
Button2.Enabled := false ;
Button3.Enabled := false ;
end;
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar