Академический Документы
Профессиональный Документы
Культура Документы
begin
timer1.enabled:=False;
MESSAGEDLG('INGRESO AL SISTEMA CORRECTAMENTE'#13'BIENVENIDO
',MTINFORMATION,[mbOK],1);
close
end
else if FORM1.Tag<4>=4 THEN
BEGIN
TIMER1.ENABLED:=FALSE;
MESSAGEDLG('USUARIO NO AUTORIZADO',MTWARNING,[MbOK],1);
close
end
else
begin
FORM1.Tag:=FORM1.Tag+1;
EDIT1.SelStart:=0;
EDIT1.SelLength:=LENGTH(EDIT1.Text);
EDIT1.CLEAR;
EDIT2.CLEAR;
EDIT1.SetFocus
END;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label4.Caption:='le resta '+inttostr(timer1.Tag)+' seg';
TIMER1.Tag:=TIMER1.Tag-1;
IF TIMER1.Tag=0 THEN
BEGIN
TIMER1.Enabled:=FALSE;
LABEL4.Caption:='';
APPLICATION.MessageBox('SE CERRARA EL SISTEMA',' TIEMPO
AGOTADO',MB_OK);
CLOSE
end;
end;
end.
Publicado por Reinaldo Cotaa en 06:02 0 comentarios
canvas.MoveTo(100,100);
canvas.LineTo(200,200);
canvas.Pen.Color:=clyellow;
Canvas.Brush.Color := clblue;
Canvas.Brush.Style := bsDiagCross;
Canvas.Ellipse(0, 0, Image1.Width, Image1.Height);
end;
begin
canvas.Pen.Color:=clyellow;
canvas.MoveTo(300,300);
canvas.LineTo(200,200);
end;
begin
Canvas.pen.Style:=pssolid;
canvas.Pen.Color:=clred;
Canvas.Brush.Color := clblue;
Canvas.Brush.style:=bsHorizontal ;
Polygon
canvas.
([point(400,400),point(400,500),point(500,500),point(500,500)]);
end;
begin
canvas.Pen.Color:=cllime;
Canvas.pen.Style:=psDashDotDot;
canvas.Arc(100,300,300,600,0,0,0,0);
end;
end;
end.
Publicado por Reinaldo Cotaa en 11:27 0 comentarios
unit salario;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Edit4: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
procedure BitBtn1Click(Sender: TObject);
private { Private declarations }
public { Public declarations }
end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BitBtn1ClickSender:TObject);
var
a:integer;
b:integer;
c:integer;
d:integer;
m,n:real;
begin
a:=StrToInt(Edit1.Text);
b:=StrToInt(Edit2.Text);
c:=StrToInt(Edit3.Text);
d:=StrToInt(Edit4.Text);
else
begin
if((d>a)and(d>c))then
begin
m:=b/d;
n:=a*c; edit5.Text:=FloatToSTR(n);
edit6.Text:=FloatToSTR(m);
end;
end;
end;
end//fin
else
begin
if((c>a) and (c>b) and (c>d))then
begin//inicio
if((a>b)and (a>d))then
begin
m:=c/a;
n:=b*d;
edit5.Text:=FloatToSTR(n);
edit6.Text:=FloatToSTR(m);
end
else
begin
If((b>a)and (b>d))then
begin
m:=c/b;
n:=a*d;
edit5.Text:=FloatToSTR(n);
edit6.Text:=FloatToSTR(m);
end
else
begin
if((d>a)and(d>b))then
begin
m:=c/d;
n:=a*b;
edit5.Text:=FloatToSTR(n);
edit6.Text:=FloatToSTR(m);
end;
end;
end;
end//final
else
begin
if((d>a) and (d>b) and (d>c))then
begin//inicio
if((a>b)and (a>c))then
begin
m:=d/a;
n:=c*b;
edit5.Text:=FloatToSTR(n);
edit6.Text:=FloatToSTR(m);
end
else
begin
If((b>a)and (b>d))then
begin
m:=d/b;
n:=a*c;
edit5.Text:=FloatToSTR(n);
edit6.Text:=FloatToSTR(m);
end
else
begin
if((c>a)and(c>b))then
begin
m:=d/c;
n:=a*b;
edit5.Text:=FloatToSTR(n);
edit6.Text:=FloatToSTR(m);
end;
end;
end;
end;//final
end;
end;
end;
end;
end.
Publicado por Reinaldo Cotaa en 06:14 0 comentarios
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button3Click(Sender: TObject);
begin
CLOSE
end;
procedure TForm1.Button1Click(Sender: TObject);
VAR
a,b,c,d,e,min:real;
begin
try
a:= StrTofloat(Edit1.text);
b:= StrTofloat(Edit2.text);
c:= StrTofloat(Edit3.text);
d:= StrTofloat(Edit4.text);
e:= StrTofloat(Edit5.text);
min:= a;
If b < min then
min:= b;
If c < min then
min:= c;
If d < min then
min:= d;
If e < min then
min:= e;
Edit6.Text:=Floattostr(min);
except
on
EconvertError do ShowMessage(#9' ERROR EN LOS DATOS INGRESADOS ');
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Edit6.Clear;
Edit1.SetFocus;
end;
end
Publicado por Reinaldo Cotaa en 18:11 0 comentarios
y2:=d*cos(pi*e/180)*sin(pi*f/180);
z2:=d*sin(pi*e/180);
dist:=sqrt(sqr(x2-x1)+sqr(y2-y1)+sqr(y2-y1));
edit7.Text:=floattostr(dist);
end;
end.
Publicado por Reinaldo Cotaa en 18:07 0 comentarios
2009 (11)
o mayo (4)
GRAFICOS EN DELPHI
o abril (6)
EL MENOR DE 5 MUNEROS
INSTRUCCIONES
PORGRAMA SALUDO
o marzo (1)
Delphi
Datos personales
Reinaldo Cotaa
Ver todo mi perfil