?? carinfoform.pas
字號:
unit CarInfoForm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TfrmCarInfo = class(TForm)
pnlBottom: TPanel;
pnlClient: TPanel;
btnOK: TButton;
btnCancel: TButton;
Label1: TLabel;
Label2: TLabel;
ecDescription: TEdit;
ecYear: TEdit;
procedure btnOKClick(Sender: TObject);
private
FYear: Integer;
FDescription: string;
{ Private declarations }
public
{ Public declarations }
property Description: string read FDescription;
property Year: Integer read FYear;
end;
implementation
{$R *.DFM}
procedure TfrmCarInfo.btnOKClick(Sender: TObject);
begin
FDescription := ecDescription.Text;
try
FYear := StrToInt(ecYear.Text);
except
ModalResult := mrNone;
ActiveControl := ecYear;
ShowMessage('Year is not a valid number.');
exit;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -