private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
label some;
begin
with MediaPlayer1 do
begin
try{测试文件是否存在,若存在则播放,否则显示出错信息}
FileName:='e2.avi';
Open;
Display:=Panel1;
DisplayRect := Panel1.ClientRect;
Notify := True;
Play;