.


:




:

































 

 

 

 


қ ұ 4 ққ құ құ




 

22 +1+0=0 қ ң құ ( 2=0).

 

1. Form1 ққ.ғ қStandard . TLabel, TEdit, TMemo TButton . Label 1 Captionқ ө ә ққ: 2*^2+A1*X+A0=0

 

ә ұ ү қ қ:

 

AutoSize- False,

WordWrap- True, Alignment- taCenter.

 


 

2. Font қ ө ә ң ү ү қ. ққ ң ө 8 - 10-ғ ө. Ok-.

3. Label2, Label3, ә Label4 Caption қң A0=, A1=, ә

 

A2= әққ.

4. Edit1, Edit2 ә Edit3 Text қ ң ққ.

5. Memo1 Lines қ ң қ-, ү ү қ. ғ String list editor Memo1 ө. Ok- .

6. Button1 ә Button2 Caption қ ә қ.

7. қң қ ә OnClick қғ :

 

procedure TForm1.Button1Click(Sender: TObject); var a0,a1,a2,d,x1,x2:double;

begin

a0:= StrToFloat(Edit1.Text);

a1:= StrToFloat(Edit2.Text);

a2:= StrToFloat(Edit3.Text); d:= a1*a1-4*a2*a0;

if d>=0 then begin

x1:= (-a1+sqrt(d))/(2*a2);

x2:= (-a1-sqrt(d))/(2*a2); Memo1.Lines.Add(':'); Memo1.Lines.Add('x1='+FloatToStrF(x1,ffGeneral,7,2)); Memo1.Lines.Add('x2='+FloatToStrF(x2,ffGeneral,7,2)); end;

 

if d<0 then Memo1.Lines.Add(''); end;

 

8. F12 , ғ қ . ә OnClick қ Memo1.Clear ққ;

 

9. F9 . қ ңң ү қ. ү .

 


 

Ққ ң қ ө ө . unit MyProject;

 

interface uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;

type

TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit; Memo1: TMemo; Button1: TButton; Button2: TButton;

procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private

{ Private declarations } public

{ Public declarations } end;

var

Form1: TForm1; implementation {$R *.DFM}

 

procedure TForm1.Button1Click(Sender: TObject); var a0,a1,a2,d,x1,x2:double;

begin

a0:= StrToFloat(Edit1.Text);

a1:= StrToFloat(Edit2.Text);

a2:= StrToFloat(Edit3.Text); d:= a1*a1-4*a2*a0;

 


if d>=0 then begin

x1:= (-a1+sqrt(d))/(2*a2);

x2:= (-a1-sqrt(d))/(2*a2); Memo1.Lines.Add(':'); Memo1.Lines.Add('x1='+FloatToStrF(x1,ffGeneral,7,2)); Memo1.Lines.Add('x2='+FloatToStrF(x2,ffGeneral,7,2)); end;

 

if d<0 then Memo1.Lines.Add(''); end;

procedure TForm1.Button2Click(Sender: TObject); begin

Memo1.Clear;

end; end

құ 5 құ ұ

Қ құ.

 

. қ Tools|Image Editorқ қ.

 

1. Delphi- қ ң ұ Paint қ ғ қ ұ File|New|BitmapFile (.bmp) ң . ғ

BitmapPropertiesңWidthe () -300, Height ()-200

 

қ. Colors-ғ VGA (16 colors) қ қ ң Ok-.

 

 


 

2. ө қ. ү (Text) . ұ Text|Font қ ө.

 

3. File|Save , қ қ. қ File|Exit қ ғ.

 

4. Additional ғ Image (- Imagel) қ

 

5. Pictureқ ң ә ң ү ү . PictureEditor . Load қ.

 

PictureEditor Ok- . ғ ө ү, Autosizeқ True- қ. , ң қғ ..

 

 

6. Timer1 ә OnTimer қ ө құ:

7. қ, ғ .

 


ң қ ғ ө ө. unit Yupi2;

 

interface uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls;

 

type

TForm2 = class(TForm) Timer1: TTimer; Image1: TImage;

procedure Timer1Timer(Sender: TObject); procedure Image1Click(Sender: TObject); private

{ Private declarations } public

{ Public declarations } end;

var

Form2: TForm2; implementation

 

{$R *.DFM}

procedure TForm2.Timer1Timer(Sender: TObject); begin

If Image1.Visible=true then Image1.Hide else Image1.Show;

end;





:


: 2017-01-28; !; : 765 |


:

:

. .
==> ...

1486 - | 1450 -


© 2015-2024 lektsii.org - -

: 0.014 .