Hi!

Is it possible that the presence of #02 and/or #03 in the string read by 
scanner cause the code read not to be showed in the corresponding edit box?
I see 2 possibilities here. As below:

1. The string read by the scanner is not pssed to edit box

2. The string read by the scanner is passed to the edit box but it remains in 
blank 'cause of special characters #02 and/or #03.

In your opinion, wich is the most probable possibility in this case?

I confess I didn't consider the item 2 above...

Cheers
----- Original Message -----
From: Antonio Fortuny
Sent: 03/21/13 12:26 PM
To: [email protected]
Subject: Re: [Lazarus] Fw: Re: One last ask for help

Le 21/03/2013 15:02, "Arí Ricardo Ody" a écrit : > Hi Ricardo. ---> Hi Antonio 
As of my last experience (Datalogic, Motorola former Symbol models, all using 
WinCE) the scanner itself needs to be very carefully configured. --->Can tell 
little bit more about this? Depends on each model. There should be some kind of 
program to set the scanner config Usually tap button Windows, on the 
applications screen select Settings, then there should be a program specific to 
the hardware having a barcode icon of so. ---> In my application user must see 
the code scanned. Are you suggesting that I can't see the code because I wait 
the input in a TEdit? No, it seems that the characters from the scaaner are not 
sent to the wright place If I use a TLabel it will be showed? You can"t manage 
to use a direct input as the TLabel is not input capable. You can only change 
the caption by assignment ---> What is the exactly use of this event in this 
case? set MyForm.KeyPreview to True; set MyForm.OnKeyPress to an event (i.e. 
MyFormKeyPress) procedure TMyForm.FormKeyPress(Sender: TObject; var Key: char); 
begin case Ord(Key) of {$IFDEF WIN32} Ord('>'), // this helps to simulate on 
Win32 {$ENDIF} Ord(#03): begin // aka EOT Key := #0; try if Scann.Buffer = 
EmptyStr then Exit; codebarre := scann.buffer; ... ... do whatever has to be 
done with the scannes barcode ... finally Scann.Reset; Scann.Reading := False; 
end end; {$IFDEF WIN32} Ord('<'), // this helps to simulate on Win32 {$ENDIF} 
Ord(#02): begin // aka STX Scann.Reset; Key := #0; // ignore key Scann.Reading 
:= True; end else begin Scann.Buffer := Scann.Buffer + Key; Key := #0; // 
ignore key end end end; I open a nem porject in Lazarus 1.0 RC1(Is the only one 
I have in this machine in my work) and can't find the KeyPreview event. see 
above -- _______________________________________________ Lazarus mailing list 
[email protected] 
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to