or you could have something like:

var
  bCanGo : Boolean = True;

implementation

procedure TForm1.Button1Click(Sender: TObject);
begin
  repeat
    if not bCanGo then
      Sleep(1000);
  until bCanGo;

  bCanGo := False;
  NMHTTP1.Get('http://www.blah.com');
  bCanGo := True;
end;

Best regards,
Sergei

> Can you just enable /disable the button - not wonderful but a 
> quick fix !!!
> 
> Regards


> Paul McKenzie
>      I have a form with a button and a NMHTTP component.  When the
>      button is pressed the NMHTTP Get method is called.  I want the
>      application to not respond until that method has completed.  If I
>      double click the button I am getting an error saying 
> that there is
>      a socket error because I am already connected.
> 
>      What do I do to stop this?
> 
>      Chrissy.
> 
> 
>      
> --------------------------------------------------------------
> -------------
>          New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
>                        Website: http://www.delphi.org.nz
>      To UnSub, send email to: [EMAIL PROTECTED]
>      with body of "unsubscribe delphi"(See attached file: att1.eml)
> 
> 
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to