D
donyad
Unregistered / Unconfirmed
GUEST, unregistred user!
//一个对注册表操作的小程序,编译错误
//希望大家帮看看,错误出在最后一行
unit CSKey;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button2: TButton;
Button3: TButton;
Button1: TButton;
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button3Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Key: String;
Reg: TRegistry;
......
//到这里编译报错
//[Error] CSKey.pas(39): Undeclared identifier: 'TRegistry'
//(39)就是Reg: TRegistry;
//Why? 我抄的例程呀
//大家帮指点一下初学者
//希望大家帮看看,错误出在最后一行
unit CSKey;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button2: TButton;
Button3: TButton;
Button1: TButton;
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button3Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Key: String;
Reg: TRegistry;
......
//到这里编译报错
//[Error] CSKey.pas(39): Undeclared identifier: 'TRegistry'
//(39)就是Reg: TRegistry;
//Why? 我抄的例程呀
//大家帮指点一下初学者