一个Delphi的小程序问题
procedureTForm1.FormCreate(Sender:TObject);beginButton2.Enabled:=false;Button3.Enable...
procedure TForm1.FormCreate(Sender: TObject);
begin
Button2.Enabled:=false;
Button3.Enabled:=false;
Button4.Enabled:=false;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.Filter:='avi文件(*.avi)|*.avi';
if opendialog1.Execute then
begin
animate1.FileName:=opendialog1.FileName;
Animate1.Open:=True;
animate1.Play(1,0,0);
Button2.Enabled:=false;
Button3.Enabled:=true;
Button4.Enabled:=true;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
animate1.Play(1,0,0);
Button2.Enabled:=false;
Button3.Enabled:=true;
Button4.Enabled:=true;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
animate1.Seek(animate1.FrameCount div 2);
Button2.Enabled:=true;
Button3.Enabled:=false;
Button4.Enabled:=false;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
animate1.stop;
Button2.Enabled:=true;
Button3.Enabled:=false;
Button4.Enabled:=false;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
close
end;
end.
这个是代码,是做一个AVI的播放器,程序运行正确但是不能播放AVI电影,等高手支着
请说明要如何修改 展开
begin
Button2.Enabled:=false;
Button3.Enabled:=false;
Button4.Enabled:=false;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.Filter:='avi文件(*.avi)|*.avi';
if opendialog1.Execute then
begin
animate1.FileName:=opendialog1.FileName;
Animate1.Open:=True;
animate1.Play(1,0,0);
Button2.Enabled:=false;
Button3.Enabled:=true;
Button4.Enabled:=true;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
animate1.Play(1,0,0);
Button2.Enabled:=false;
Button3.Enabled:=true;
Button4.Enabled:=true;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
animate1.Seek(animate1.FrameCount div 2);
Button2.Enabled:=true;
Button3.Enabled:=false;
Button4.Enabled:=false;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
animate1.stop;
Button2.Enabled:=true;
Button3.Enabled:=false;
Button4.Enabled:=false;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
close
end;
end.
这个是代码,是做一个AVI的播放器,程序运行正确但是不能播放AVI电影,等高手支着
请说明要如何修改 展开
展开全部
播放电影应该用mediaplayer组件吧,animate不能播放有声avi.
-----------------------------
楼主先搜一下吧,这方面的资料应该能找到的。
http://www.longtengwang.com/softcode/Delphi/meiti/200712/3206.html
先做一下如何
-----------------------------
楼主先搜一下吧,这方面的资料应该能找到的。
http://www.longtengwang.com/softcode/Delphi/meiti/200712/3206.html
先做一下如何
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询