J
jackywang44
Unregistered / Unconfirmed
GUEST, unregistred user!
我想用TMediaPlayer实现一个avi文件的播放,但是我参考了几本书,编号后,发现点击播放键是没有作用的!求助!
程序如下:
procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.Execute then
begin
mediaplayer1.FileName:=opendialog1.FileName;
mediaplayer1.DeviceType:= dtAVIVideo;
mediaplayer1.Display := Panel1;
mediaplayer1.Open;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
mediaplayer1.Close;
end;
不知道哪里有问题?
程序如下:
procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.Execute then
begin
mediaplayer1.FileName:=opendialog1.FileName;
mediaplayer1.DeviceType:= dtAVIVideo;
mediaplayer1.Display := Panel1;
mediaplayer1.Open;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
mediaplayer1.Close;
end;
不知道哪里有问题?