你应该看一下,你的FormCreate是不是正确的,也许你早先写了一个Create事件!!!能再看Form事件吧!!!!!

解决方案 »

  1.   

    不可能啊,原代码都在这里了:unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Memo1: TMemo;
        Button1: TButton;
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;
    implementation{$R *.dfm}procedure TForm1.FormCreat(sender:TObject)
    var
    FileName:String;
    beginFileName:='C:\AUTOEXEC.BAT';
    With Memo1 do
    begin
    LoadFromFile(FileName)
    SaveToFile(ChangeFileExt(FileName,'BAK'));
    end;end; 
    end.
      

  2.   

    没有声名,在private 或public 下面加上 :
    procedure FormCreat(sender:TObject)
      

  3.   

    对,楼上的漏了个';'号
    procedure FormCreat(sender:TObject);
      

  4.   

    procedure TForm1.FormCreat(sender:TObject)改为:
    procedure TForm1.FormCreate(sender:TObject);
                              ^
                              |
                           这里是不是少了一个"e"