我要源码?(50分)

  • 主题发起人 主题发起人 bzmouse
  • 开始时间 开始时间
B

bzmouse

Unregistered / Unconfirmed
GUEST, unregistred user!
谁有播放AVI的源码(或方法)?
我要!
bzmouse@sohu.com
 
播放AVI动画源代码如下:
unit media1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls, MPlayer;
type
TForm1 = class(TForm)
MediaPlayer1: TMediaPlayer;
Timer1: TTimer;
TrackBar1: TTrackBar;
Button1: TButton;
Button2: TButton;
Button3: TButton;
OpenDialog1: TOpenDialog;
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button3Click(Sender: TObject);
begin
if mediaplayer1.filename<>'' then
begin
mediaplayer1.Close;
timer1.enabled:=false;
end;

end;

procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.execute then
begin
mediaplayer1.filename:=opendialog1.filename;
timer1.enabled:=false;
mediaplayer1.close;
mediaplayer1.Open;
mediaplayer1.timeformat:=tfhms;
caption:=opendialog1.filename;
trackbar1.min:=0;
trackbar1.max:=mediaplayer1.length;
trackbar1.position:=0;
end;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
if mediaplayer1.filename<>'' then
begin
mediaplayer1.wait:=false;
mediaplayer1.play;
timer1.enabled:=true;
end;

end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
trackbar1.position:=mediaplayer1.position;
end;

end.
 
mediaplayer1.timeformat:=tfhms;
它的意思是?
 
timeformat属性参数可以看帮助
 
时间过长,斑竹代为结束!
 
后退
顶部