?? fmmain.pas
字號:
unit fmMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses uClasses;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
aObj : TBase;
begin
aObj := TDerived1.Create;
aObj.VM2;
aObj.Free;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
aFoo : TFoo;
aFoo1 : TFoo;
begin
aFoo := TFoo.Create;
aFoo1 := TFoo.Create;
try
{
aFoo.Field := 10;
aFoo.SetField(10);
aFoo.SetStr('Test');
ShowMessage(IntToStr(aFoo.Field));
ShowMessage(aFoo.GetStr);
aFoo.VM1;
}
aFoo.VM1;
aFoo1.VM1;
ShowMessage(aFoo.MyName);
ShowMessage(aFoo1.MyName);
finally
aFoo.Free;
aFoo1.Free;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -