[Error] Unit1.pas(37): Undeclared identifier: 'Close' [Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
pedrograd
Üye
Mesajlar: 1
Kayıt: 29 Ara 2021 01:49

[Error] Unit1.pas(37): Undeclared identifier: 'Close' [Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.

Mesaj gönderen pedrograd »

[Error] Unit1.pas(37): Undeclared identifier: 'Close'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'


kapat tuşu eklemeye çalışıyorum bu iki hatayı alıyorum nedeni nedir?

Kod: Tümünü seç

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Menus, RichEdit;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Memo1: TMemo;
    Panel1: TPanel;
    Edit2: TEdit;
    Edit3: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    kapat: TButton;
    procedure kapatClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.kapatClick(Sender: TObject);
begin
  kapat.Close;
end;

end.
mahsuni
Üye
Mesajlar: 99
Kayıt: 21 Haz 2003 01:09
Konum: Ankara-Mamak

Re: [Error] Unit1.pas(37): Undeclared identifier: 'Close' [Fatal Error] Project1.dpr(5): Could not compile used unit 'Un

Mesaj gönderen mahsuni »

Kod: Tümünü seç

procedure TForm1.kapatClick(Sender: TObject);
begin
  Close;
end;
Cevapla