A
abnertan
Unregistered / Unconfirmed
GUEST, unregistred user!
我在delphi的form上加了一个button,产生如下代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
[red]Button1: TButton;
procedure Button1Click(Sender: TObject);
[/red]private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
end;
end.
为什么Button1: TButton;
procedure Button1Click(Sender: TObject);不属于private,protect,public的任何一个,
并且如果把他们改写到private或public中去后,编译将无法通过,为什么,能不能说一说其中的原理,
我想是否和vcl的消息处理机制有关?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
[red]Button1: TButton;
procedure Button1Click(Sender: TObject);
[/red]private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
end;
end.
为什么Button1: TButton;
procedure Button1Click(Sender: TObject);不属于private,protect,public的任何一个,
并且如果把他们改写到private或public中去后,编译将无法通过,为什么,能不能说一说其中的原理,
我想是否和vcl的消息处理机制有关?