估计问题是很大的,呵呵,请老兄给指点指点:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdHTTP, IdIntercept, IdSSLIntercept, IdSSLOpenSSL,
IdLogBase, IdLogDebug;
type
TForm1 = class(TForm)
Button1: TButton;
HTTP: TIdHTTP;
memoHTML1: TMemo;
cbUrl: TComboBox;
memoHTML2: TMemo;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function ylb(p
ointer):longint;stdcall;
var
i:integer;
dc:hdc;
begin
form1.memoHTML1.Clear;
form1.memoHTML1.Lines.Text := form1.HTTP.Get(form1.cbURL.Text);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
memoHTML1.Clear;
memoHTML1.Lines.Text := HTTP.Get(cbURL.Text);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
hthread:thandle;
threadid:dword;
intTotalThread ,i: Integer;
begin
intTotalThread := StrToInt(trim(Edit1.Text));
threadid := 1;
for i :=1 to intTotalThread do
begin
hthread:=createthread(nil,0,@ylb,nil,0,threadid);
Label1.Caption := IntToStr(i);
end;
end;
end.