Me オブジェクト
VBの Me オブジェクトはフォーム自身を表します。
Delphi では Self を使用します。Self はそのメソッドが呼び出されたオブジェクトを参照します。
■ Self の使用例 |
procedure TForm1.Button1Click(Sender: TObject); type TTest = record Name : string; Caption : string; end; var Test : TTest; begin with Test do begin Caption := 'Delphi'; Self.Caption := 'Borland'; ShowMessage(Self.Name); end; end; |