.


:




:

































 

 

 

 





, , , .. :

) ;

) , ;

) ;

) ;

) ;

) ;

) ;

) ;

) ;

) ;

2 .

[] :

[];

[];

Edit,

.

[];

[];

- .

; [];

[ ];

, , .

 


Delphi

;

1)Button - , ,

Button ( ), Standart. BitBtn ( Button), , , . , .

2) Edit- Edit Text.

3) Image- Image , .

4) Label- Label.

5) MainMenu- , .. , , .


() .

:

- , , . ; , . , ;

;

, , , . ;

- .

:

1) Intel Core i5-230 CPU 2.8 GHz 3.0 GHz, 2.00 ,

32 Windows 7, 1440900 ;

2) D Athlon 262 Dual Core Processor 3600 1.91 GHz,

- 2.00 , Windows Professional 2002 Service Pack, 11 52864;

3) Intel(R)r()i5-23 00 [email protected] 3.00 , 512 , Windows Professional 2002 Service Pack 3 644742.

(1 22) , . - , , . , MS Sans Serif .

 


. .

. һ.

. .

;

;

, , , , ;

.

. (, , , ).

. , CD-RW DVD-ROM, DVD\CD-RW , .

. .

, Project1.exe . .

:

1) ;

2) ;

:

1) ;

.

, .

 


, .

:

;

;

.

.

, . , , , , i 11ii . .

, :

1) ;

2) ;

) ;

4) .

.

.


 

 

 

unit Unit1;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Menus, ExtCtrls, StdCtrls, ImgList, jpeg;

 

type

TForm1 = class(TForm)

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Button1: TButton;

Label4: TLabel;

Label5: TLabel;

Label7: TLabel;

MainMenu1: TMainMenu;

N1: TMenuItem;

N2: TMenuItem;

N3: TMenuItem;

N4: TMenuItem;

N5: TMenuItem;

N6: TMenuItem;

N7: TMenuItem;

N8: TMenuItem;

N9: TMenuItem;

N10: TMenuItem;

Image1: TImage;

PopupMenu1: TPopupMenu;

N11: TMenuItem;

N12: TMenuItem;

N13: TMenuItem;

procedure Button1Click(Sender: TObject);

procedure N5Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure N10Click(Sender: TObject);

procedure N9Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form1: TForm1;

 

implementation

 

uses Unit2;

 

{$R *.dfm}

 

procedure TForm1.Button1Click(Sender: TObject);

var

a,b,c:integer;

p,pl,plo,m:real;

begin

try

a:=StrToInt(Edit1.text);

b:=StrToInt(Edit2.text);

c:=StrToInt(Edit3.text);

// Image1.Visible:=false;

except

on EConvertError do

begin

MessageDlg(' . ',mtError,mbOKCancel,0);

Exit;

end;

end;

if (a=b) and (b=c) and (a=c) then

begin

p:=a+b+c;

pl:=p/2;

Image1.Picture.LoadFromFile('x_79462021.bmp');

Label4.Caption:=': '+ FloatToStr(p);

plo:=sqrt(p*(p-a)*(p-b)*(p-c));

Label5.Caption:=': '+ FloatToStrF(plo,ffGeneral,5,10);

m:=1/2*sqrt(sqr(a)+sqr(b));

Label7.Caption:=': '+ FloatToStrF(m,ffGeneral,5,10);

Image1.Visible:=true;

Label4.Visible:=true;

Label5.Visible:=true;

Label7.Visible:=true;

end;

if not(a=b) and not(b=c) and not(a=c)then

begin

p:=a+b+c;

pl:=p/2;

Image1.Picture.LoadFromFile('x_fde1e6a2.bmp');

Label4.Caption:=': '+ FloatToStr(p);

plo:=sqrt(p*(p-a)*(p-b)*(p-c));

Label5.Caption:=': '+ FloatToStrF(plo,ffGeneral,5,10);

m:=1/2*sqrt(sqr(a)+sqr(b));

Label7.Caption:=': '+ FloatToStrF(m,ffGeneral,5,10);

 

Image1.Visible:=true;

Label4.Visible:=true;

Label5.Visible:=true;

Label7.Visible:=true;

end;

if (a=b) or (b=c) or (c=a) then

begin

p:=a+b+c;

pl:=p/2;

Image1.Picture.LoadFromFile('x_eddc7bc7.bmp');

Label4.Caption:=': '+ FloatToStr(p);

plo:=sqrt(p*(p-a)*(p-b)*(p-c));

Label5.Caption:=': '+ FloatToStrF(plo,ffGeneral,5,10);

m:=1/2*sqrt(sqr(a)+sqr(b));

Label7.Caption:=': '+ FloatToStrF(m,ffGeneral,5,10);

Image1.Visible:=true;

Label4.Visible:=true;

Label5.Visible:=true;

Label7.Visible:=true;

end;

if (a+b=c) or (b+c=a) or (a+b=c) then

begin

p:=a+b+c;

pl:=p/2;

Image1.Picture.LoadFromFile('x_25989f26.bmp');

Label4.Caption:=': '+ FloatToStr(p);

plo:=sqrt(p*(p-a)*(p-b)*(p-c));

Label5.Caption:=': '+ FloatToStrF(plo,ffGeneral,5,10);

m:=1/2*sqrt(sqr(a)+sqr(b));

Label7.Caption:=': '+ FloatToStrF(m,ffGeneral,5,10);

Image1.Visible:=true;

Label4.Visible:=true;

Label5.Visible:=true;

Label7.Visible:=true;

end;

end;

procedure TForm1.N5Click(Sender: TObject);

begin

Form1.Close;

end;

 

procedure TForm1.N4Click(Sender: TObject);

begin

Edit1.Clear;

Edit2.Clear;

Edit3.Clear;

SetFocus;

Image1.Visible:=false;

Label4.Visible:=false;

Label5.Visible:=false;

Label7.Visible:=false;

end;

 

procedure TForm1.N10Click(Sender: TObject);

begin

Form2.ShowModal;

end;

 

procedure TForm1.N9Click(Sender: TObject);

begin

Application.HelpFile:=('MyHelp.hlp');

Application.HelpCommand(HELP_FINDER,0);

end;

 

end.

 

 





:


: 2016-11-12; !; : 1471 |


:

:

. .
==> ...

1440 - | 1407 -


© 2015-2024 lektsii.org - -

: 0.058 .