delphi 把MP3做背景音乐


unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, MPlayer;

type
TForm1 = class(TForm)
Button1: TButton;
MediaPlayer1: TMediaPlayer;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
MediaPlayer1.Visible := False;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
MediaPlayer1.FileName := 'c:\temp\Test.mp3';
MediaPlayer1.Open;
MediaPlayer1.Play;
end;

end.
联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678