unit U00; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; type { TForm1 } TForm1 = class(TForm) // procedure FormClick(Sender: TObject); // procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure Edit1KeyPress(Sender: TObject; var Key: char); procedure FormCreate(Sender: TObject); private { private declarations } procedure zamknij_mnie(Sender : TObject); procedure oblicz_mnie(sender : Tobject); public { public declarations } end; var Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.zamknij_mnie(sender : TObject); begin application.Terminate; end; procedure Tform1.oblicz_mnie(sender : TObject); begin Tedit.FindComponent('e2').; end; procedure TForm1.FormCreate(Sender: TObject); var zamknij,oblicz : TButton; e1,e2 : TEdit; l1 : TLabel; begin form1.KeyPreview:=true; // przycisk zamknij zamknij:=TButton.Create(self); zamknij.Parent:=Form1; zamknij.Width:=50; zamknij.Height:=25; zamknij.left:=1200; zamknij.Left:=form1.Width-70; zamknij.top:=form1.Height-50; zamknij.Caption:='Zamknij'; zamknij.OnClick:=@zamknij_mnie; zamknij.Visible:=true; Zamknij.Show; // Pole edycyjne e1 e1:=TEdit.CreateParented(form1.Handle); e1.Width:=50; e1.Height:=25; e1.left:=form1.width-70; e1.Top:=form1.Height-100; e1.Name:='e1'; e1.Text:=''; e1.Show; // Pole edycyjne e2 e2:=TEdit.CreateParented(form1.Handle); e2.Width:=50; e2.Height:=25; e2.left:=form1.width-70; e2.Top:=form1.Height-140; e2.name:='e2'; e2.Text:=''; e2.Show; // etykieta l1:=TLabel.Create(form1); l1.Parent:=Form1; l1.Left:=form1.Width-140; l1.Top:=form1.Height-97; l1.Font.Color:=clNavy; l1.ParentFont:=true; l1.Caption:='Średnica : '; l1.Name:='Srednica'; l1.Transparent:=true; l1.AutoSize:=true; l1.Visible:=true; l1.Show; // przycisk oblicz oblicz:=TButton.Create(self); oblicz.Parent:=Form1; oblicz.Width:=50; oblicz.Height:=25; oblicz.left:=1200; oblicz.Left:=form1.Width-70; oblicz.top:=form1.Height-180; oblicz.Caption:='Oblicz'; oblicz.OnClick:=@oblicz_mnie; oblicz.Visible:=true; oblicz.Show; end; procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: char); begin end; end.