interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TID3Tag = packed record
TAGID: array[0..2] of char;
Title: array[0..29] of char;
Artist: array[0..29] of char;
Album: array[0..29] of char;
Year: array[0..3] of char;
Comment: array[0..29] of char;
Genre: byte;
end;
type
TForm1 = class(TForm)
Button1: TButton;
OpenDialog1: TOpenDialog;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Bevel1: TBevel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
ComboBox1: TComboBox;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
id3tag: Tid3tag;
Fichiermp3: Tfilestream;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then begin
Fichiermp3:=Tfilestream.create(OpenDialog1.FileName,fmOpenRead);
try Fichiermp3.position:=Fichiermp3.size-128;
Fichiermp3.Read(id3tag,SizeOf(id3tag));
Edit1.Text:=+id3tag.title;
Edit2.Text:=+id3tag.artist;
Edit3.Text:=+id3tag.album;
Edit4.Text:=+id3tag.year;
Edit5.Text:=+id3tag.comment;
ComboBox1.Text:=+ComboBox1.Items[id3tag.genre];
finally Fichiermp3.free;
end;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Close;
end;
end.













