, , , .
InputBox, , . InputBox :
:= InputBox (, , );
: , ; ; ; , .
, :
S:= InputBox(-, , );
. (. 10).
. 10.
OK, S . InputBox . , .
, . . . 1 .
Delphi , , Edit Memo. , , . Edit (. 11) Text () . :
a:= StrToFloat(Edit1.Text);
TMemo Text Lines (). TMemo . . , Lines. Text .
, , .
ShowMessage MessageDlg.
ShowMessage . ShowMessage :
ShowMessage();
.
MessageDlg Windows, , . . 12 ,
|
|
r:= MessageDlg( + #13
+ ., mtInformation, [mbOK], 0);
. 12.
MessageDlg , , . MessageDlg :
:= MessageDlg (, , , );
. , . , . . , , 2.
2
MessageDlg
, , . , <F1> , . , MessageDlg .
, Label, . . ( 2.1), Caption. Edit Text, Memo Text Lines.
.
Caption . Panel . Tanel . , . . Properties Align () alBottom, Caption . Align , . . alBottom , . , : Label, Edit, Button.
TLabel . Caption , . TButton Ok. TEdit Text .
Temo. Align alClient, , ( ). Temo , Memo1. , , Lines . Font , .
|
|
. , . Ok, TEdit
F = 1.8C + 32,
Temo. OnClick ( ) :
procedure TForm1.Button1Click(Sender: TObject);
var x,y: real;
begin
x:= StrToFloat(Edit1.Text);
y:= 1.8 * x + 32;
Memo1.Lines.Add(Edit1.Text + C = + FormatFloat(#####.##,y) + F);
Edit1.Clear;
Edit1.SetFocus
end;
. . Temo Add . Add TStringList Lines . . . dit1, y C= F. FormatFloat (. 1 ). Clear SetFocus dit1 .
. 13.
. 13.