4 (210297 ) 2.301 ( 2.004). .
: Times New Roman.
, 14 .
, 14 .
.
. .
15 .
4, , :
) 30 ;
) 10 ;
) 20 .
, .
.
, , , . .
25 . , , .
- .
- .
- . .
- OLE COM.
- - .
- .
- . . .
- .
- .
- .
VCL
, VCL. TObject, . , . , . - , .
VCL , Delphi. , TObject, TComponent ( ) TControl ( ).
TObject
TObject VCL. , , . - , .
|
|
. .
, , , . .
, . SomeList TStrings. Create SomeList . Newinstance, :
class function Newinstance: TObject; virtual;
TObject . , TObject, .
:
constructor Create;
, inherited:
constructor TSomeObject.Create;
begin
inherited Create;
end;
TObject Destroy Free:
Tbjet , .
Tbjet. VCL Tbjet, . , . , , Tbjet.
Create() Destroy() Tbjet . Tbjet.Create() . Tbjet , .
VCL Tbjet, , , () , Tbjet.
TControl
TControl , , . , TControl . TControl , Top Left, Width Height, . : ClientRect, ClientWidth ClientHeight.
TControl , : Visible, Enabled Color. Font , , TControl. Text Caption.
|
|
TControl : OnClick, OnDblClick, OnMouseDown, OnMouseMove OnMouseUp, OnDragOver, OnDragDrop OnEndDrag.
TControl . . TControl . TWinControl ( VCL) TWidgetControl ( CLX). (windowed) . TControl Parent.
1.
TForm:
OnActivate | C , , .. , . |
OnClose | OnCloseQuery. |
OnCloseQuery | . . |
OnCreate | . . |
OnDiactivate | . |
OnDestroy | . |
OnHelp | . |
OnHide | , . |
OnPaint | . |
OnShortCut | |
OnShow | , . |
onKeyDown | |
onKeyUp | |
onKeyPress | . onKeyDown onKeyUp- Key |
onMouseDown | |
onMouseUp | |
onMouseMove |
. , , . , , .
, , n () Brush (), n TBrush, . .
, , : , , , . , , , . 2.
2.
n ()
Color | |
Width | |
Style | |
Mode |
Color , . . 3 ( TColor), Color.
3.
Color
clBlack | clSilver | ||
clMaroon | clRed | ||
clGreen | clLime | ||
clOlive | clBlue | ||
clNavy | - | clFuchsia | - |
clPurple | clAqua | ||
clTeal | - | clWhite | |
clGray |
|
|
width ( ). , canvas.Pen.width: =2 2 .
style () , , . . 4 , . 1. Pen.width , .
4.
n.
psSolid | |
psDash | , |
psDot | , |
psDashDot | , |
psDashDotDot | , |
psClear | (, , , ) |
(canvas.Brush) , , , () . , , , . 5.
5.
TBrush ()
Color | |
Style | () |
. , .
Color TColor (. Pen.Color . 4).
, , . 6.
6.
Brush, style
() | |
bsSolid | |
bsClear | |
bsHorizontal | |
bsVertical | |
bsFDiagonal | |
bsBDiagonal | |
bsCross | - , |
bsDiagCross | , |