C
cfhi
Unregistered / Unconfirmed
GUEST, unregistred user!
用DELPHI自带mediaplay做的媒体播放器,如果先播放视频文件则在Panel中正常显示,而在播放MP3或WMA后再播放视频文件文件时则不在Panel中显示而另开窗口显示,如何解决?
代码如下:
statictext1.Caption:=list.Items.Strings[list.Itemindex];
mp1.FileName:=list.Items.Strings[list.Itemindex];
if (lowercase(combo.Text)='*.wav')or(lowercase(combo.Text)='*.mp3')or(lowercase(combo.Text)='*.wma')then
panel1.Caption:='正在播放......';
mp1.Open;
mp1.DisplayRect:=panel1.ClientRect;
mp1.Play;
代码如下:
statictext1.Caption:=list.Items.Strings[list.Itemindex];
mp1.FileName:=list.Items.Strings[list.Itemindex];
if (lowercase(combo.Text)='*.wav')or(lowercase(combo.Text)='*.mp3')or(lowercase(combo.Text)='*.wma')then
panel1.Caption:='正在播放......';
mp1.Open;
mp1.DisplayRect:=panel1.ClientRect;
mp1.Play;