procedure TForm1.Button1Click(Sender: TObject);
 var
          nmhttp:   TNMHttp;
begin   nmhttp.Post('www.163.com','');end;运行时异常,好像没初始化,该如何初始化啊?另:
或在delphi6/delphi7中有什么其它好的控件可向指定的url post数据,并获得响应

解决方案 »

  1.   

    ype
      TForm1 = class(TForm)
        Edit1: TEdit;
        Edit2: TEdit;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
          nmhttp:   TNMHttp;
      public
     
      end;var
      Form1: TForm1;implementation{$R *.dfm}
    procedure TForm1.Button1Click(Sender: TObject);begin
       nmhttp.InputFileMode:=False;
       nmhttp.OutputFileMode:=True;
       nmhttp.ReportLevel:=Status_Basic;
       nmhttp.Post('url','');//运行时异常end;end.-------------
    请问这是怎么回事
      

  2.   

    TNMHttp是什么组件?
    不过看的出是一个类的,应该是没有Create
    加入下面的看看procedure   TForm1.Button1Click(Sender:   TObject);begin
          nmhttp:=TNMHttp.Create();///这里有可能有参数,自己看看是什么参数,补上啦,不知道就再贴出来问吧
          nmhttp.InputFileMode:=False;
          nmhttp.OutputFileMode:=True;
          nmhttp.ReportLevel:=Status_Basic;
          nmhttp.Post('url','');//运行时异常end;end.