高手帮忙把我下面发的一段代码的没一句的含义帮忙解释出来 急急急! 先谢谢了!
unit Main;
interface
uses
SysUtils, Windows, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, MPlayer, ExtCtrls, ComCtrls;
type
TMainForm = class(TForm)
OpenDialog1: TOpenDialog;
Panel1: TPanel;
TrackBar1: TTrackBar;
Button1: TButton;
MediaPlayer1: TMediaPlayer;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure MediaPlayer1Notify(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure MediaPlayer1Click(Sender: TObject; Button: TMPBtnType;
var DoDefault: Boolean);
procedure TrackBar1Change(Sender: TObject);
procedure Panel1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
opened: Boolean;
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.DFM}
procedure TMainForm.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
with MediaPlayer1 do
begin
Filename := OpenDialog1.Filename;
Open;
DisplayRect := Rect(0, 0, Panel1.Width, Panel1.Height);
Notify := true;
opened := true;
TrackBar1.Max := length;
end;
end;
procedure TMainForm.MediaPlayer1Notify(Sender: TObject);
begin
MessageDlg('Media control method executed', mtInformation, [mbOk], 0);
end;
procedure TMainForm.Timer1Timer(Sender: TObject);
begin
if opened then
TrackBar1.Position := MediaPlayer1.Position ;
end;
procedure TMainForm.MediaPlayer1Click(Sender: TObject; Button: TMPBtnType;
var DoDefault: Boolean);
begin
end;
procedure TMainForm.TrackBar1Change(Sender: TObject);
begin
end;
procedure TMainForm.Panel1Click(Sender: TObject);
begin
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
end;
end.