不用控件.

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;  function DoFileDownload(lpszFile:String):Integer;stdcall; external 'shdocvw.dll' name 'DoFileDownload';var
      Form1: TForm1;implementation{$R *.dfm}function ToUnicode(const aWideStr: WideString): string;
    var
      sUnicodeHex: string;
      i : integer;
    begin
      for i := 1 to Length(aWideStr) do
      begin
        sUnicodeHex := Format('%.4x', [Word(aWideStr[i])]);
        sUnicodeHex := Chr(StrToInt('$' + Copy(sUnicodeHex, 3, 2))) +
            Chr(StrToInt('$' + copy(sUnicodeHex, 1, 2)));
        Result := Result + sUnicodeHex;
      end;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
    DoFileDownload(ToUnicode('http://qdlxj.8u8.com/12.wma'));
    end;end.