delphi 程序?
unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,F...
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
------------------------------------------------------------------------------------------
上面有一处我不明白
先是有
TForm1 = class(TForm)
然后再有
var
Form1: TForm1;
那为什么BUTTON不这么定义?
按我想应该这样(如下):
TButton1 = class(TButton)
var
Button1: TButton1; 展开
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
------------------------------------------------------------------------------------------
上面有一处我不明白
先是有
TForm1 = class(TForm)
然后再有
var
Form1: TForm1;
那为什么BUTTON不这么定义?
按我想应该这样(如下):
TButton1 = class(TButton)
var
Button1: TButton1; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询