如何在窗体中调用Web服务器文件???
用了nmhttp 组件,但是没有反应??代码如下!应该怎么做呢??还有其他方法吗?
procedure TMainForm.Button1Click(Sender: TObject);
begin
  nmhttp1.Get('http://10.131.131.10/index.html');
end;

解决方案 »

  1.   

    uses urlmon;
    procedure TMainForm.Button1Click(Sender: TObject);
    begin
      urldownloadfile(nil,'http://10.131.131.10/index.html','e:\test.html',0);
    end;
      

  2.   

    urlmon在哪里啊??找不到,而且运行以上代码,出:
    [Error] Unit1.pas(28): Undeclared identifier: 'urldownloadfile'的错误,
    还有urldownloadfile方法的'e:\test.html'参数是什么意思
      

  3.   

    //var Content:String;  
    With NMHTTP1 do
      Begin
        InputFileMode:=false;
        outputfileMode:=false;
        reportLevel:=Status_Basic;
        get('www.sohu.com');
        Content:=body;
      end;
      

  4.   

    lazywolf(二代)朋友:
    我运行了以上代码,Content:=body;报错,当我将它屏蔽后,运行又没有反应???
    应该打开www.sohu.com网页才对啊。请指教!!!!