.


:




:

































 

 

 

 


ө. Delphi .




қ. Delphi .

:

1. ң ө ө.

2. Delphi .

3. Private .

 

1. ң ө ө. ң құ ө қ ө қ ұ: Private(ғ), protected(қғғ), public(ү), automated(ғ). Ә ң ө, ә қ қ.

ң ө ө қ. ublic ғ ө өң ө ө , ә қ қ қғ . Published ө ө , қ ұ ң ғ ү қ ғ , құ ң қ .

Published . Delphi ғ ғ қ ғ , қ , ғ . ұ Published .

Private ө ө ң ө ң : қ ң ң , ғ ғ қ ә ққ ғ ғ .

Private ғ , қ қ , ң қ ұқ ү .

2. rotected ң ә ү, - қ, ң ұқ ү , қ ң ә.

utomated OLE қ қ ә ү : ұ ң үң ө ө .

Object Pascal , ғ қ қ , қ . ү. ң ғ ө ө .

Unit Unit1;

Uses Controls,Forms;

Type

TForm1= class(TForm)

Button1: TButton;

Private

FintField: integer;

Procedure SetValue (Value: Integer);

Function GetValue: Integer;

Published

Property IntField: read GetValue write Setvalue

Protected

Procedure Proc1;

Public

Procedure pros2;

End;

Var

Form1: TForm1;

Implementation

Procedure TForm1.Proc1;

Buttom1.Color:ClBtnFace;

FIntField:=0;

IntField:=0;

Pros1;

Pros2;

End;

Begin

Form1.Button1.Color:=clBtnFace;

Form1.FlintField:=0;

Form1.Proc1; // ұ қ!

Form1.Proc2;

End;

Unit Unit2;

Interface

Uses Controls, Unit1;

Type

TForm2=class(TForm1)

Button2:TButton;

Procedure Button2Click(Sender:TObject);

End;

Var

Form2:TForm2;

Implementation

Procedure TForm2.Button2Click(Sender:TObject);

Begin

Button1.Color:=clBtnFace;

FlntField:=0; // ұ қ!

Proc1;

Proc2;

End;

Begin

Form1.Button1.Color:=clBtnFace;

Form1.FIntField:=0; // ұ қ!

Form1.IntField:=0;

Form1.Proc1; // ұ қ!

Form1.Proc2; End;

3. - ұқ ө ө қ ө ғ . ғ ү ө ғ .

Type

TForm2=class(TForm2)

Public

Procedure Proc1;

End;

Unit2 қғ : Form2.prog1.

Private ғ ұқ ө, қ ғ ғ .

ң ө ү ң қ ң . ққ ң ө қғ .

 






:


: 2017-02-24; !; : 1197 |


:

:

.
==> ...

1542 - | 1379 -


© 2015-2024 lektsii.org - -

: 0.011 .