Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
- IdTCPClient, IdHTTP;
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Edit1: TEdit;
- IdHTTP1: TIdHTTP;
- Edit2: TEdit;
- Label1: TLabel;
- Label2: TLabel;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- TMyThread = class(TThread)
- private
- { Private declarations }
- protected
- procedure Execute; override;
- end;
- var
- Form1: TForm1;
- MyThread: TMyThread;
- a:integer;
- implementation
- {$R *.dfm}
- procedure TMyThread.Execute;
- begin
- While true do
- begin
- Form1.idhttp1.get(Form1.Edit1.text);
- end;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- for a:=0 to strtoint(Form1.Edit2.text) do
- MyThread:=TMyThread.Create(False);
- MyThread.Priority:=tpNormal;
- MyThread.FreeOnTerminate:=true;
- a:=a+1;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement