我在编译程序时,编译器给出如下错误提示:
 Field <Field Name> does not have a corresponding component. Remove the declaration?

解决方案 »

  1.   

    我把这些变量又添加了一次,结果还是一样error,请问该如何添加?
      

  2.   

    unit Unit1;
      interface
      uses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls, OleCtrls, SHDocVw, Psock, NMHttp, ExtCtrls;
      type
      TForm1 = class(TForm)
      NMHTTP1: TNMHTTP;
      Panel1: TPanel;
      Button1: TButton;
      Memo3: TMemo;
      Memo2: TMemo;
      Memo1: TMemo;
      Panel2: TPanel;
      WebBrowser1: TWebBrowser;
      procedure Button1Click(Sender: TObject);
      procedure NMHTTP1Success(Cmd: CmdType);
      procedure NMHTTP1Failure(Cmd: CmdType);
      procedure FormCreate(Sender: TObject);
      private { Private declarations }
      public { Public declarations }
      end;
      var
      Form1: TForm1;
      implementation
      {$R *.DFM}
      procedure TForm1.FormCreate(Sender: TObject);
      begin
      WebBrowser1.Navigate('about:blank');
      end;  procedure TForm1.Button1Click(Sender: TObject);
      begin
      With NMHTTP1 do
      Begin
      InputFileMode :=False;
      OutputFileMode :=True;
      ReportLevel :=Status_Basic;
      end;
      With NMHTTP1.HeaderInfo do
      begin
      Cookie :='';
      LocalMailAddress :='';
      LocalProgram :='';
      Referer :='';
      UserID :='';
      Password :='';
      try
      NMHTTP1.Post('http://db.sohu.com/regurl/regform.asp?
      Step=Create&Class=C016015005002&sitename=十万个为什么
      &url=http://helps1000000.yeah.net','PostData.txt');
      except
      showMessage(' Error! ');
      end;
      End;
      end;  procedure TForm1.NMHTTP1Success(Cmd: CmdType);
      begin
      Case Cmd of
      CmdPOST:
      begin
      Memo1.Text := NMHTTP1.Header;
      Memo2.Text := NMHTTP1.Body;
      WebBrowser1.OleObject.document.body.innerHTML :=NMHTTP1.Body;
      Memo3.Lines.Add('HTTP POST Successful');
      end;
      end;
      end;  procedure TForm1.NMHTTP1Failure(Cmd: CmdType);
      begin
      Memo1.Text := NMHTTP1.Header;
      Memo2.Text := NMHTTP1.Body;
      case Cmd of
      CmdPOST:
      Memo3.Lines.Add('HTTP Post Failed');
      end;
      end;
      end.