Hi

I have a PC with a barcode scanner and keyboard attached to its PS/2 plug
using the Y cable.
In my VFP8 application, I want to control the type of input method for a
textbox control in a form.
That means that I want the data to be input to a textbox control ONLY from
the barcode scanner, NOT from the keyboard.

Is there a way to determine or control the input method for textbox control?

Appreciate your help.

Tham

Re: How to determine the input method for the textbox control? by Man-wai

Man-wai
Thu Aug 10 03:23:34 CDT 2006

tham wrote:
> Hi
>
> I have a PC with a barcode scanner and keyboard attached to its PS/2 plug
> using the Y cable.
> In my VFP8 application, I want to control the type of input method for a
> textbox control in a form.
> That means that I want the data to be input to a textbox control ONLY from
> the barcode scanner, NOT from the keyboard.
>
> Is there a way to determine or control the input method for textbox control?

Are you using VFP 9? There is a IMESTATUS() function

--
SoftMedia Technology Co., Ltd.
Website: http://www.softmedia.hk Tel: (852)2743 4228
* TryEasy Accounting/POS/Trading/ERP solutions

Re: How to determine the input method for the textbox control? by tham

tham
Thu Aug 10 03:45:35 CDT 2006

Hi Chang

The IMEStatus() function is to control the multi-language input.
What I want is to prevent the input from the Keyboard, meaning when the
textbox got focus, whatever the user type in the keyboard is ignored.
But input from the Barcode Scanner is allowed, meaning when the textbox got
focus, whatever the user scanned (e.g barcode: "123456") is automatically
input to the textbox control.



"Man-wai Chang" <info@softmedia.hk> wrote in message
news:ezWQHZFvGHA.3936@TK2MSFTNGP04.phx.gbl...
> tham wrote:
>> Hi
>>
>> I have a PC with a barcode scanner and keyboard attached to its PS/2 plug
>> using the Y cable.
>> In my VFP8 application, I want to control the type of input method for a
>> textbox control in a form.
>> That means that I want the data to be input to a textbox control ONLY
>> from the barcode scanner, NOT from the keyboard.
>>
>> Is there a way to determine or control the input method for textbox
>> control?
>
> Are you using VFP 9? There is a IMESTATUS() function
>
> --
> SoftMedia Technology Co., Ltd.
> Website: http://www.softmedia.hk Tel: (852)2743 4228
> * TryEasy Accounting/POS/Trading/ERP solutions



Re: How to determine the input method for the textbox control? by Bernhard

Bernhard
Thu Aug 10 05:01:12 CDT 2006

Hi tham,

> I have a PC with a barcode scanner and keyboard attached to its PS/2 plug
> using the Y cable.
> In my VFP8 application, I want to control the type of input method for a
> textbox control in a form.
> That means that I want the data to be input to a textbox control ONLY from
> the barcode scanner, NOT from the keyboard.
>
> Is there a way to determine or control the input method for textbox control?

The barcode scanner is connected to your PC with an Y cable and simulates
keyboard input. On first hand it is not possible to check whether the input
comes from real keyboard or from the "simulated keyboard" of the scanner.

I once made something like this (back in FP DOS) by checking, whether the
keystrokes arrive within short time (coming from barcode) or within longer time
(human mostly do not type very fast). It worked good enough for that special case.

To really distinguish between the two input devices, you should not connect the
barcode scanner with an Y cable but use a separate connection to the PC. Ask the
manufacturer of your the barcode scanner.

Regards
Bernhard Sander

Re: How to determine the input method for the textbox control? by Michel

Michel
Thu Aug 10 08:37:46 CDT 2006

Tham,

Some barcode scanner can be set with sending a control code before or/and
after the barcode. That could be a way to determine the input origin.

--
Michel Lévy
Communauté Francophone des Professionnels FoxPro
Pour un développement durable...
http://www.atoutfox.org
--
"Bernhard Sander" <fuchs@no.spam> a écrit dans le message de news:
%23KolpPGvGHA.1504@TK2MSFTNGP03.phx.gbl...
> Hi tham,
>
>> I have a PC with a barcode scanner and keyboard attached to its PS/2 plug
>> using the Y cable.
>> In my VFP8 application, I want to control the type of input method for a
>> textbox control in a form.
>> That means that I want the data to be input to a textbox control ONLY
>> from the barcode scanner, NOT from the keyboard.
>>
>> Is there a way to determine or control the input method for textbox
>> control?
>
> The barcode scanner is connected to your PC with an Y cable and simulates
> keyboard input. On first hand it is not possible to check whether the
> input comes from real keyboard or from the "simulated keyboard" of the
> scanner.
>
> I once made something like this (back in FP DOS) by checking, whether the
> keystrokes arrive within short time (coming from barcode) or within longer
> time (human mostly do not type very fast). It worked good enough for that
> special case.
>
> To really distinguish between the two input devices, you should not
> connect the barcode scanner with an Y cable but use a separate connection
> to the PC. Ask the manufacturer of your the barcode scanner.
>
> Regards
> Bernhard Sander



Re: How to determine the input method for the textbox control? by Andrew

Andrew
Fri Aug 11 02:34:11 CDT 2006

"Michel LEVY" <stop.michelvfplevy@nospam.yahoo.fr> wrote in message
news:OsphsIIvGHA.3372@TK2MSFTNGP02.phx.gbl...
> Tham,
>
> Some barcode scanner can be set with sending a control code before or/and
> after the barcode. That could be a way to determine the input origin.

Yes, best thing I can think of is use a preamble string from the scanner and
check for that. Of course you can still type the preamble string with a
keyboard..

What are you going to do if a barcode will not scan though?
Usual answer is to key in the number..
If you really don't want to use the keyboard, don't plug it in!

--
regards
Andrew Howell



Re: How to determine the input method for the textbox control? by tham

tham
Fri Aug 11 04:11:34 CDT 2006

Hi

Actually this is a requirement from our customer.
They want the operator to scan the CardID.
Manually entered the cardID is not allowed as they afraid the operator will
remember the ID and use it illegally.



"Andrew Howell" <ajh@work> wrote in message
news:eBX3WiRvGHA.1772@TK2MSFTNGP06.phx.gbl...
> "Michel LEVY" <stop.michelvfplevy@nospam.yahoo.fr> wrote in message
> news:OsphsIIvGHA.3372@TK2MSFTNGP02.phx.gbl...
>> Tham,
>>
>> Some barcode scanner can be set with sending a control code before or/and
>> after the barcode. That could be a way to determine the input origin.
>
> Yes, best thing I can think of is use a preamble string from the scanner
> and check for that. Of course you can still type the preamble string with
> a keyboard..
>
> What are you going to do if a barcode will not scan though?
> Usual answer is to key in the number..
> If you really don't want to use the keyboard, don't plug it in!
>
> --
> regards
> Andrew Howell
>



Re: How to determine the input method for the textbox control? by Dan

Dan
Fri Aug 11 10:31:06 CDT 2006

Beautiful business model. No manual override. If the barcode scan fails,
just turn that customer away. Didn't need their money anyway.

;-)

Dan

tham wrote:
> Hi
>
> Actually this is a requirement from our customer.
> They want the operator to scan the CardID.
> Manually entered the cardID is not allowed as they afraid the
> operator will remember the ID and use it illegally.
>
>
>
> "Andrew Howell" <ajh@work> wrote in message
> news:eBX3WiRvGHA.1772@TK2MSFTNGP06.phx.gbl...
>> "Michel LEVY" <stop.michelvfplevy@nospam.yahoo.fr> wrote in message
>> news:OsphsIIvGHA.3372@TK2MSFTNGP02.phx.gbl...
>>> Tham,
>>>
>>> Some barcode scanner can be set with sending a control code before
>>> or/and after the barcode. That could be a way to determine the
>>> input origin.
>>
>> Yes, best thing I can think of is use a preamble string from the
>> scanner and check for that. Of course you can still type the
>> preamble string with a keyboard..
>>
>> What are you going to do if a barcode will not scan though?
>> Usual answer is to key in the number..
>> If you really don't want to use the keyboard, don't plug it in!
>>
>> --
>> regards
>> Andrew Howell