unit WinForm;

interface

uses
  System.Drawing, System.Collections, System.ComponentModel,
  System.Windows.Forms, System.Data,Registry;

type
  TWinForm = class(System.Windows.Forms.Form)
  {$REGION 'Designer Managed Code'}
  strict private
    /// <summary>
    /// Required designer variable.
    /// </summary>
    Components: System.ComponentModel.Container;
    Panel1: System.Windows.Forms.Panel;
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    procedure InitializeComponent;
    procedure TWinForm_KeyPress(sender: System.Object; e: System.Windows.Forms.KeyPressEventArgs);
    procedure Button1_Click(sender: System.Object; e: System.EventArgs);
  {$ENDREGION}
  strict protected
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    procedure Dispose(Disposing: Boolean); override;
  private
  klawiszX, klawiszY: integer;
  myszka: boolean;
    { Private Declarations }
  public

    constructor Create;
  end;

  [assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]

implementation

{$AUTOBOX ON}

{$REGION 'Windows Form Designer generated code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWinForm.InitializeComponent;
begin
  Self.Panel1 := System.Windows.Forms.Panel.Create;
  Self.SuspendLayout;
  // 
  // Panel1
  // 
  Self.Panel1.BackColor := System.Drawing.Color.Red;
  Self.Panel1.Location := System.Drawing.Point.Create(38, 28);
  Self.Panel1.Name := 'Panel1';
  Self.Panel1.Size := System.Drawing.Size.Create(432, 249);
  Self.Panel1.TabIndex := 0;
  // 
  // TWinForm
  // 
  Self.AutoScaleBaseSize := System.Drawing.Size.Create(6, 15);
  Self.BackColor := System.Drawing.Color.Yellow;
  Self.ClientSize := System.Drawing.Size.Create(508, 302);
  Self.Controls.Add(Self.Panel1);
  Self.Name := 'TWinForm';
  Self.Text := 'Dziura (Windows Forms)';
  Self.TransparencyKey := System.Drawing.Color.Red;
  Include(Self.KeyPress, Self.TWinForm_KeyPress);
  Self.ResumeLayout(False);
end;
{$ENDREGION}

procedure TWinForm.Dispose(Disposing: Boolean);
begin
  if Disposing then
  begin
    if Components <> nil then
      Components.Dispose();
  end;
  inherited Dispose(Disposing);
end;

constructor TWinForm.Create;
begin
  inherited Create;
  //
  // Required for Windows Form Designer support
  //
  InitializeComponent;
  //
  // TODO: Add any constructor code after InitializeComponent call
  //
end;

procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
begin

end;

procedure TWinForm.TWinForm_KeyPress(sender: System.Object; e: System.Windows.Forms.KeyPressEventArgs);
begin
  if e.KeyChar = Chr(27) then Close;
end;

end.
