-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrmOperacionesExtrasUnit2.pas
More file actions
83 lines (67 loc) · 1.72 KB
/
Copy pathFrmOperacionesExtrasUnit2.pas
File metadata and controls
83 lines (67 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
unit FrmOperacionesExtrasUnit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TFrmOperacionesExtras = class(TForm)
CheckBox1: TCheckBox;
AreaCuboCheckBox: TCheckBox;
AreaRectanguloCheckBox: TCheckBox;
AreaCuadradoCheckBox: TCheckBox;
AreaCilindroCheckBox: TCheckBox;
AreaCirculoCheckBox: TCheckBox;
LbNum1: TLabel;
LbNum2: TLabel;
Num1Edit: TEdit;
Num2Edit: TEdit;
BtnButton: TButton;
procedure FormCreate(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure BtnButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmOperacionesExtras: TFrmOperacionesExtras;
implementation
{$R *.dfm}
procedure TFrmOperacionesExtras.BtnButtonClick(Sender: TObject);
var num1,num2,result:Extended;
begin
//AREA TRIANGULO
if CheckBox1.Checked then
begin
num1 := StrToFloat(Num1Edit.Text); //BASE
num2 := StrToFloat(Num2Edit.Text); // ALTURA
result := (num1 * num2) /2;
end
else if AreaCirculoCheckBox.Checked then
begin
end
else if AreaCilindroCheckBox.Checked then
begin
end
else if AreaCuadradoCheckBox.Checked then
begin
end
else if AreaRectanguloCheckBox.Checked then
begin
end
else if AreaCuboCheckBox.Checked then
begin
end;
end;
procedure TFrmOperacionesExtras.CheckBox1Click(Sender: TObject);
begin
LbNum1.Caption := 'Base';
LbNum2.Caption := 'Altura';
end;
procedure TFrmOperacionesExtras.FormCreate(Sender: TObject);
begin
//OPERACIONES
//
end;
end.