.


:




:

































 

 

 

 





Delphi


Delphi ( 1). : Delphi, Form1, Object Inspector Unit1.pas, .

 

1.

 

Delphi ( 2) Delphi, .
Form1 () .

 

2


Delphi .


( Delphi ) - , .

:

, , .

() Form1. : , , , . Properties () Object Inspector ( ) (. 3). , - .

 

 

 

3. Caption


Caption (). Form1 -. Caption. , (Form1) caption (), ( 3). <Backspase>, Form1 -.
Height width, . 185 290.

:

, , . . .

, Windows, . . ( ) . Height width. .
, , Color (), , ), .
, .
, , . "". , "" "".
Font , Windows, .
. Name, , .
. 2.1 ( ). .

 

 

1.

 

 

Name Form1
Caption -
Height  
Width  
Font.Name Arial
Font.Size  

 


. 1 Name size Font. , .
, . 1, , . 4.

 

 

4.

 


- . Windows . - .
Delphi , , , , ( ). . , , , Object Inspector ( ).
, ( 5) , , , -
. .

 

 

. 5. Standard


, , , , , , . .
. 6 (Edit1). , (), (). , .

6.


Object Inspector ( ). . 2 - .


2.

 

. () Name
, - Text
Left
Top
Height
Width
, Font
ParentFont

 

 

Delphi .
, , , , , . Delphi ( Left T).
, , , , , , . . Delphi : ( Height width).
, , . Object Inspector ( ), ( ).

. 3 , .


3, (Edit1)

 

(Name)
Text  
Top  
Left  
Height  
Width  

 

 

: .
, , . , . "" ( ) Standard () (. 3). , Object Inspector ( ).
. . .
, , . 7

 

 

7.

 

 

4. Label1 Label2

 

(Name) Labe1 Label2
Caption <>  
AutoSize false false
Top    
Left    
Height    
Width    
Wordwrap true true
ParentFont true false

 

ParentFont ( ) Label2 false. Font Font "", . , . Label1 ParentFont .
AutoSize ( ) true, Delphi , .
AutoSize false , .
, , , .
, . ( ) Standard () . Object Inspector ( , . 5

 

5. Button1

 

(Name)
Caption
Top  
Left  
Height  
Width  

 

 

. 8

, . , <>. - , Windows .

- , Delphi . , - OnClick, - OnDblClick.

 

6. Windows

 

OnClick
OnDblClick
OnEnter ,
OnError
OnExit ,
OnKeyDown . OnKeyDown OnKeyPress - , , , .
OnKeyPress , . <Ctrl>. <Tab>, <Enter> .
OnKeyUp
OnMouseDown
OnMouseMove
OnMouseUp

 

 

- . , OnClick, <>, . . , . .

, . <>. Events () Object Inspector. , () . 9.

 

9.

 

Events , . , .

, , (.. ). Unit1.pas ( ) ) ( 10), .

 

 

10.

, . , , . . - Form1, - Button1, Click.

begin end Object Pascal, . OnClick <>:

procedure TForm1.Button1Click(Sender: TObject);
var
f:real; //
k:real; //

begin
f:=StrToFloat(Edit1.Text); // Edit1
k:=f*0.4059;
label2.Caption:=Edit1.text+' (/) '+
FloatToStr(k)+' ';
end;

[an error occurred while processing this directive]

Edit1 Text. Text (), StrToFloat.

Label2 Caption. ( ) FloatToStr.

() Object Pascal (begin, end, const, var ) , .

. ( - '{'), , , . , , . , , .





:


: 2016-11-18; !; : 552 |


:

:

, .
==> ...

1561 - | 1442 -


© 2015-2024 lektsii.org - -

: 0.038 .