A
angelwork
Unregistered / Unconfirmed
GUEST, unregistred user!
一个简单的例子:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
test;
end;
end.
unit Unit2;
interface
type
Angel = Class
procedure test();
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
uses Unit1;
{ Angel }
procedure Angel.test;
begin
form1.color:=form1.Color;
end;
end.
就这两个单元,自定义声明的过程在unit1单元中无法访问!不知道究竟是为什么嘛,高手们帮忙看看,给段正确的两个unit 代码好嘛?谢谢
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
test;
end;
end.
unit Unit2;
interface
type
Angel = Class
procedure test();
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
uses Unit1;
{ Angel }
procedure Angel.test;
begin
form1.color:=form1.Color;
end;
end.
就这两个单元,自定义声明的过程在unit1单元中无法访问!不知道究竟是为什么嘛,高手们帮忙看看,给段正确的两个unit 代码好嘛?谢谢