unit VLFNewForm;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls, ComCtrls;

type
  TNewForm = class(TForm)
    OKBtn: TButton;
    CancelBtn: TButton;
    GroupBox1: TGroupBox;
    WidthUpDown: TUpDown;
    WidthEdit: TEdit;
    Label2: TLabel;
    Label3: TLabel;
    HeightEdit: TEdit;
    HeightUpDown: TUpDown;
    procedure WidthEditChange(Sender: TObject);
    procedure HeightEditChange(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  NewForm: TNewForm;

implementation

uses Tahoma;

{$R *.dfm}

procedure TNewForm.WidthEditChange(Sender: TObject);
begin
  try
    WidthUpDown.Position := StrToInt(WidthEdit.Text);
  except
    // tichá vyjímka
  end;
end;

procedure TNewForm.HeightEditChange(Sender: TObject);
begin
  try
    HeightUpDown.Position := StrToInt(HeightEdit.Text);
  except
    // tichá vyjímka
  end;
end;

procedure TNewForm.FormShow(Sender: TObject);
begin
  ActiveControl := WidthEdit;
end;

procedure TNewForm.FormCreate(Sender: TObject);
begin
  TahomizeForm(Self);
end;

end.
