.


:




:

































 

 

 

 


Image.Canvas.LineTo(X, Y);




in , ssLeft Shift, , .

, , (Pen):

Image.Canvas.Pen.Color:= clRed;

(Color) (Pen) (clRed). . ϳ .

. , Image () : , , Image . Image ( 䳿 OnPaint).

3.

, Circle (). GroupIndex 1: Color Circle . AllowAllUp true, Circle (/ ).

Circle , .

ChildUnit , :

xc, yc: Integer;

Image 䳿 OnMouseDown :

// Circle

If MainForm.Circle.Down Then

Begin

xc:= X; //

yc:= Y; //

Image.Canvas.Ellipse(xc-100, yc-100, xc+100, yc+100);

End;

. , Down () Circle, , , uses MainUnit;

. , .

, , 䳿 :

if ssLeft in Shift Then //

// Circle

If MainForm.Circle.Down Then

Begin

//

Image.Canvas.Ellipse(xc-100, yc-100, xc+100, yc+100);

xc:= X; //

yc:= Y; //

//

Image.Canvas.Ellipse(xc-100, yc-100, xc+100, yc+100);

end //

else Image.Canvas.LineTo(X, Y);

, , . :

Image.Canvas.Pen.Mode:= pmNotXor;

䳿 OnCreate ( ) Child.

1. Canvas? TCanvas.

2. If ssLeft in Shift Then Image. Canvas. LineTo (X, Y);

3. Image ?

4. Down, GroupIndex AllowAllUp .

5. ᒺ?

1. (). .

2. : , , . .

3. ( , ).

4. ( , ).

5. , . .

6. ( Image). Image.

7. .

8. ( ).

9. .

10. .

11. .

12. .

13. . . .

14. ( ) . .

15. . . .


8

: .

: Object Pascal Delphi.

, a[10] .

1. a 10 . , a ( a ).

2. TEdit TButton a[10]. , TEdit. .

3. Count, .

:

Var

Code: Integer;

begin

//

inc(Count);

If Count ≤ 10 Then Val(Edit1.Text, a[Count], Code);

Edit1.Text:= ; //

end;

( Count) , Edit1.Text a[Count]. Val. . Code ( ). , Code 0.

4. . . Edit1.Text .

5. Button1 ( Default true) Button1Click Enter.

6. - .

TListBox, . TListBox Items.

7. TButton . :

Var

i: Integer; //

//

max: Real;

begin

max:= a[1];

for i:= 1 to 10 do //

Begin

If a[i] > max Then max:= a[i];

ListBox1.Items.Add(IntToStr(i) + + FloatToStr(a[i]));

End;

ListBox1.Items.Add( + FloatToStr(max));

end ;

. IntToStr(i), FloatToStr(a[i]) ListBox1 Add. . () StrToInt, StrToFloat.

1. ? ?

2. ( ) ?

3. TListBox? TListBox.

1. 12 . . .

2. 10 . . .

3. 10 . , . .

4. 12 . . .

5. 10 . , ( ). .

6. X[10]. .

7. [10], ≤ -2 x ≥ 2. .

8. A[10] . .

9. A[8] . .

10. A[5] . .

11. a[10] .

12. a[12] , ≤ -3 ≥ 1. .

13. a[10] . .

14. 8 . , 2 3. .

15. 12 . , 2 3. .


9

: ().

: 㳺 () Object Pascal Delphi.

TStringGrid ( Additional).

TStringGrid:

ColCount .

RowCount .

+Options

goEditing ( Enter F2 ).

goAlwaysShowEditor ( goEditing).

, goEditing goAlwaysShowEditor true.

Cells.

property Cells[ACol, ARow: Integer]: String;

Cells ( String), .

ACol, ARow ( ). .

StringGrid1:

Var

//

Sum: Integer;

i, j: Integer; //

Begin

Sum:= 0;

For i:= 1 To StringGrid1.ColCount-1 do

For j:= 1 To StringGrid1.RowCount-1 do

Sum:= Sum + StrToInt(StringGrid1.Cells[i, j]);

Edit1.Text:= IntToStr(Sum); //

end;

. .

1. TStringGrid? , TStringGrid.

2. TStringGrid? TStringGrid?

3. Cells.

A[5][5] . .

F(4, 5) . .

T(5, 5). .

A[5][6] .

ϳ X[5][3], : -2 ≤ Xj ≤ 3. .

[5][5], -10 ≤ Xj ≤ 10, [5][5], . , .

[5][4]. .

[4][5]. .

A(5, 5) , . , .

A(4, 5), , , . .

A(5, 5), . .

A(5, 5), . .

A(5, 5) . .

A(5, 5) , , . .

A(5, 5), 2, 2, 3 3, 4 4, 5 5. .


10

: .

: , Delphi.

. .

1. ϳ : 2 = 2 + b2, a, b, c . 5 ϳ.

2. N ( , N, ).

3. , ( , ).

4. , , , .

5. , 20 Գ, :

F1 = 1; F2 = 1;

Fi+2 = Fi+1 + Fi (i ≥ 1). , F3 =2, F4 =3.

6. Գ (. ) 1,618. Գ, . .

7. ϳ . n! = 1×2×3××n.

8. . ϳ , , . , , . , 䒺 -7.16 -8. .

9. , , 12. ϳ : , , 12:00.

10. m n (0 < m ≤ 12, 0 ≤ n < 60), . ( ), .

11. x, y, z. , , x, y, z. x, y, z. .

12. x, y, z. , x < y < z. , .

13. a, b, c. a x2+ b x+ c = 0 . , . , .

14. t 0 100 T, T = 9/5*t + 32. , ( ).

15. ( ).


: .

: , 㳿 .

(

)

1. ³ . 0 99, . . ϳ , . .

2. . , . , . .

3. . . , , . .

4. . ( , : , , , , , ). ϳ . , . , .

5. ( ) ( ), ( ). : , ; ( ).

6. ϒ.

7. .

8. ( , ).

9. . , . ᒿ. .

10. . ᒺ ( ). -. .

11. Scorch ( . ).

12. ( ).

( 㳿 )

13. .

14. -.

15. , , .


: .

: Object Pascal Delphi.

( )

1. R[N] , Z[N], N=10.

2. Y Z X[10].

3. X[14], -10 ≤ X ≤ 10, Y, .

4. 12 . ϳ, , .

5. 15 . , .

6. 14 . ( , ).

7. 12 . , (, 1, -34, 8, 14, -5 3 ).

8. , 0. , 0.

9. 10 , 䒺 . , .

10. 10 . , 䒺 .

11. 8 . , . ( ) .

12. 10 . , , .

13. 5 . , (, ).

14. 10 . . .

15. 12 : , . .


1. .., .. . .: , 1988. 320 .

2. .., . . . . .: , 1993. 447 .

3. . Delphi 5. . .: , 2000. 512 .

4. . . Object Pascal Delphi. .: , 1999. 224 .

5. . . Delphi 6. .: , 2002. 1120 .

6. . Delphi 5: . .: , 2002. 640 .

7. . + = . .: , 1985. 406 .

8. .., .. : V 6.0, , . .: , 1993. 440 c.

9. . Delphi 4. : . . .: , 1998. 800 .

10. . Delphi 4 . .: , 1999. 1120 .

11. .. TURBO PASCAL - . .: , 1992. 192 c.

12. . . . . . .: , 1988. 207 .

13. . Delphi 4. . .: , 1999. 752 c.

14. . Borland Delphi 6. . . . .: , 2001. 1120 .

15. . Delphi 5. . 1. : . . .: , 2001. 839 .

16. . Delphi 5. . 2. : . . .: , 2001. 992 .

17. . Delphi 6: . .: , 2002. 352 .

18. . Delphi 6: . .: , 2002. 512 .





:


: 2016-12-06; !; : 439 |


:

:

, , 1:10
==> ...

1835 - | 1750 -


© 2015-2024 lektsii.org - -

: 0.155 .