Delphi问题

[复制链接]
查看11 | 回复2 | 2011-8-20 12:02:32 | 显示全部楼层 |阅读模式
unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,Dialogs,ComCtrls,ExtCtrls,StdCtrls,MPlayer,ShellAPI,ShlObj;typeTID3REC=packedrecord//128个字节Tag:array[0..2]ofchar;Title,Artist,Comment,Album:array[0..29]ofchar;Year:array[0..3]ofchar;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;procedureButton1Click(Sender:TObject);private{Privatedeclarations}public{Publicdeclarations}end;varForm1:TForm1;implementation{$R*.dfm}//获取mp3文件目录functionTForm1.browsedialog(constTitle:=string;constFlag:integer):string;为什么编译器说browsedialog是没定义的呢我是初学的用文字详细说下还有要怎么定义呢....
回复

使用道具 举报

千问 | 2011-8-20 12:02:32 | 显示全部楼层
在此处定义该函数。delphi需要先声明,才能写函数。private{Privatedeclarations}functionbrowsedialog(constTitle:=string;constFlag:integer):string;public{Publicdeclarations}end;private和public下都可以声明该函数
回复

使用道具 举报

千问 | 2011-8-20 12:02:32 | 显示全部楼层
publicfunctionbrowsedialog(constTitle:=string;constFlag:integer):string;end;加上这句。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行