基本上就是網站上有一個對應的網頁程式,共DELPHI呼叫,帳號密碼由 delphi 驗證通過後,網頁會給出一個資料包,DELPHI接收下並載這個檔案,然後解壓到本地機器上即可.
    如果那位朋友以前做過,也不會很難,希望幫小弟一把,先謝謝了.沒有做過的朋友給個思路也有分

解决方案 »

  1.   

    用shellexecute调用外部程序,具体使用查看帮助
      

  2.   

    shellexecute 只是能調用ie ,但並不滿足我的要求,我現在是不讓網頁顯示,直接把用戶信息提交給服務器.恐怕shellexecute 不行
      

  3.   

    問題解決了  ,現在吧核心代嗎鐵出來
    procedure Tinputinfo.Button1Click(Sender: TObject);
          //打開 klchbcvs.ini 檔案
          procedure OpenForShare(const FileName: String);
          var
            FileHandle : Integer;
          begin
            FileHandle := FileOpen(FileName, fmOpenWrite or fmShareDenyNone);
            if FileHandle > 0 then
            StrCase:=GetOrderPrint
            else
            begin
               MsgAbort('找不到klchbcvs.ini 檔案, 請確認')  ;
               Application.Terminate ;
               end;
          end;var
      IE: TInternetExplorer;
      vFlag, vFrame, vPost, vHeader: OleVariant;
      str:string  ;
    begin
      OpenForShare( extractfilepath(Application.ExeName)+'klchbcvs.ini') ;
      CoInitialize(nil);
      IE := TInternetExplorer.Create(nil);
      try
      try
        Screen. Cursor:=crHourGlass;
       // shellexecute(0,'open',pchar(httpstr),nil,nil,1);
        // 開啟新的 IE 並顯示
        IE.Visible := true;
        vFlag := navOpenInNewWindow;
        if StrCase ='0'then  //狀況1
         str:= Format('Method_Type=login& file_cd=%s&file_name=%s&user_name=%s&user_passwd=%s&dirct_down=%s', //
          [sfile_cd,sfile_name ,  EdName.Text, Edpass.Text,'1'])
          else   //狀況2
         str:= Format('Method_Type=login&file_cd=%s&file_name=%s&file_size=%s&file_date=%s&user_name=%s&user_passwd=%s&dirct_down=%s', //
          [sfile_cd,sfile_name , Localfile_size, Localfile_date,EdName.Text, Edpass.Text,'1']);
        vPost := StringToPostData( str);  //
        // Post 的資料是加在 Http-Header 後方[/red]
        // 在 Http-Header 處要多加 Content-Type 做解釋 (不需要修改)
        vHeader := 'Content-Type: application/x-www-form-urlencoded' + #10#13;
        // 使用 Navigate 連接到所要的 URL, 請依需求修改
        IE.Navigate( HttpStr , vFlag, vFrame, vPost, vHeader );
      finally
        IE.Free;
        CoUnInitialize;
        Screen.Cursor:=crDefault;
      end;
     except
     
     showmessage('登陸失敗!請檢查輸入的信息是否正確');
    end;
    end;