button1 e tıkladığımda onclick ini yani şu hata msjını veriyo
could not find source location to add method button1."END." or INITILATION not found on unit form
bulunamadı fln diyor ama hepsini koydum formun üzerine,neden böyle bi hata verirki?
unit deki kodlarım şu şekilde
Kod: Tümünü seç
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ShellApi, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
kullanici : string
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormCreate(Sender: TObject);
var
a : TextFile;
begin
if FileExists(ExtractFilePath(Application.ExeName)+'kullanici.txt') then
begin
AssignFile(a,ExtractFilePath(Application.ExeName)+'kullanici.txt');
Reset(a);
while not Eof(a) do
Readln(a,kullanici);
ShowMessage(Kullanici); // kullanici = Project2.exe nin Public kısmında
// tanımladığımız değişken ...
end;
end ;
end.