请问有谁知道怎样动态使用NMHttp这类的FastNet组件? (100分)

  • 主题发起人 主题发起人 lrc45
  • 开始时间 开始时间
L

lrc45

Unregistered / Unconfirmed
GUEST, unregistred user!
小弟的程序是这样的:
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, NMHttp, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
httpc:TNMHttp;
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
httpc.Create(application);
httpc.Get('http://auslin/ver.txt');
showmessage(httpc.Body);
end;

end.
但运行时总在httpc.Create(application);这一行出现错误,我把application换成Self或Form1、Nil等都不行,请大侠们支几招,谢谢!
 
httpc := TNMHttp.Create(nil);
...
 
Thank you very much!
 

Similar threads

I
回复
0
查看
673
import
I
I
回复
0
查看
686
import
I
I
回复
0
查看
709
import
I
I
回复
0
查看
740
import
I
后退
顶部