Delphi问题
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ExtCtrls, StdCtrls, MPlayer,ShellAPI, ShlObj;
type
TID3REC=packed record //128 个字节
Tag:array[0..2] of char;
Title,Artist,Comment,Album:array[0..29]of char;
Year:array[0..3] of char;
Genre:byte;
end;
TForm1 = class(TForm)
MediaPlayer1: TMediaPlayer;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
ListBox1: TListBox;
Label6: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Timer1: TTimer;
ProgressBar1: TProgressBar;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
//获取mp3文件目录
function TForm1.browsedialog(const Title:=string; const Flag: integer):string;
为什么编译器说browsedialog 是没定义的呢 我是初学的 用文字详细说下 还有 要怎么定义呢....
答案:在此处定义该函数。delphi需要先声明,才能写函数。
private
{ Private declarations }
function browsedialog(const Title:=string; const Flag: integer):string;
public
{ Public declarations }
end;
private和public下都可以声明该函数
其他:public
function browsedialog(const Title:=string; const Flag: integer):string;
end;
加上这句。
上一个:在delphi中case语句有什么作用?
下一个:用delphi语言,实现下列结果 A B B C C C D D D D 一直到Z。求高手帮忙