[Lazarus] Getting my app. to 'sleep'
Lee Jenkins
lee at datatrakpos.com
Mon Aug 11 18:32:19 CEST 2008
Dave Coventry wrote:
> Hi,
>
> I have been using the following code to write data to a serial printer:
>
> var ser:TBlockSerial;
> buf:string;
> begin
> ser:=TBlockserial.Create;
> try
> ser.RaiseExcept:=True;
> ser.Connect(cashdrawer);
> ser.Config(9600,8,'N',0,false,false);
> ser.SendString(buf);
> ser.Flush;
> finally
> ser.Free;
> end;
> end;
>
> However, if I use this nothing gets sent to the printer.
>
> But if I place
> showmessage('Printed!');
> after the ser.SendString(but) then it prints out as expected.
>
What a call to Sleep() ?
--
Warm Regards,
Lee
More information about the Lazarus
mailing list