不在界面上用控件 动态创建idhttp,IdAntiFreeze来用 var IdHTTP: Tidhttp; IdAntiFreeze: TidAntiFreeze; begin IdAntiFreeze:=TIdAntiFreeze.Create(nil); IdAntiFreeze.OnlyWhenIdle:=False; IdHTTP:=Tidhttp.Create(nil); try StrHtml:=IdHTTP.Get(PChar('http://www.vdj8.com/')); finally IdHTTP.Disconnect; IdHTTP.Free; end;