我在程序利用了一个vb的inet控件,我想问,他如何被打包的exe文件里,即
将exe文件考走,在别的机子上就能用(没装delphi的机子)

解决方案 »

  1.   

    或者将Inet1.OpenURL('http://202.157.184.171/newdm/index.cfm', 0);
      strURL:='http://202.157.184.171/newdm/login_auth.cfm';
      strFormData :='login='+Edit1.Text+'&password='+Edit2.Text+'&Submit=%B5n%A4J';  Inet1.Execute(strURL,'Post',strFormData,'Referer: http://202.157.184.171/newdm/index.cfm '+#13#10+'Accept-Language: zh-cn'+#13#10+ 'Content-Type: application/x-www-form-urlencoded'+#13#10+'Accept -Encoding: gzip , deflate'+#13#10);
    用idhttp控件代替
    解决另开分
      

  2.   

    你是想实现什么,如果是访问网页提交数据,那么look
    procedure TForm1.Button1Click(Sender: TObject);
    var
     oXmlHttp:olevariant;
     xmlDoc:olevariant;
    begin
      xmlDoc := '内容';
      oXmlHttp := CreateOleObject('Microsoft.XMLHTTP');
      try
       try
        oXmlHttp.Open('POST','http://localhost:8899/sys/aspregister.jsp',false);
     
        oXmlHttp.setRequestHeader('Content-Type','text/xml');
        oXmlHttp.setRequestHeader('charset','utf-8');
     
        oXmlHttp.Send(xmlDoc);
        if oXmlHttp.status = 200 then
         begin
          if Copy(oXmlHttp.responseText,1,1)='0' then
           Application.MessageBox('成功了!','OK',MB_OK)
          else
           Application.MessageBox('数据传送到JSP页面失败!','OK',MB_OK);
         end 
        else
         Application.MessageBox(PChar('失败了,网页存在等错误!'+IntToStr(oXmlHttp.status)),'False',MB_OK);
       except
        on E: Exception do Application.MessageBox(PChar(E.Message),'异常',MB_OK);
       end;
      finally
       oXmlHttp := null;
      end; 
    end;
      

  3.   

    你是做了安装程序了吗,
    如果做了 ,把delphi 的一些bpl 安装上就应该可以了,