简单的问题......?! [英] simple problem...?!

查看:60
本文介绍了简单的问题......?!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

小组,


我有一个看似简单的问题,但我找不到解决办法。我已经有了一个文本框和一个手持式扫描仪来扫描条形码,扫描仪只需要像键盘一样生成按键,如果我扫描条形码和数字是4210,扫描仪在4

上生成一个按键,而不是在1上,最后在0上。现在我的问题是什么, normaly

条形码的长度总是16(所以如果textbox.text = 16

的长度我选择整个文本,以便可以扫描下一个条形码) ,但是如果

用户例如扫描条形码错误或快速,则只生成一段

代码并且我的文本框长度不是16并且文字没有选择

选择,所以如果他们扫描下一个条形码这个条形码是错误的,因为它是b / b
填充条形码文本框,直到长度为16而不是选择文本并且

继续剩下的数字。现在这不是一个大问题,如果用户有一个鼠标或键盘,但他们只有一台扫描仪。


非常欢迎任何帮助


thnx提前彼得

Hi group,

I''ve got what seems a simple problem, but I can''t find the solution. I''ve
got a textbox and a handheld scanner to scan barcodes, the scanner just
generates keypresses like a keyboard would so if I scan a barcode and the
number from this barcode is 4210, the scanner generates a keypress on the 4
than on the 2 than on 1 and finally on the 0. Now what''s my problem, normaly
the barcodes'' length always is 16 (so if the length of the textbox.text = 16
I select the entire text so the next barcode can be scanned), but If the
user for example scans the barcode wrong or to fast, only a piece of the
code is generated and my textbox length ain''t 16 and the text doesn''t get
selected, so if they scan a next barcode this barcode is wrong because it
fills the barcode textbox untill the length is 16 than selects the text and
continues with the remaining numbers. Now this would not be a big problem if
the user had a mouse or a keyboard but they only have got a scanner.

Any help is very welcome

thnx in advance Peter

推荐答案

彼得,


我对条形码几乎一无所知。


但是每个字符串都有一个可以测试的长度属性。


dim a as string =" ; Hello"

如果a.length<> 16然后''messagebox.show(有一些错误的扫描

再次)


我的问题是什么错误?


Cor

" Peter Proost" < pp ***** @ nospam.hotmail.com>
Peter,

I know almost nothing about barcodes.

However every string has a length property what can be tested.

dim a as string = "Hello"
if a.length <> 16 then ''messagebox.show("There is something wrong scan
again")

What do I mis in your problem?

Cor
"Peter Proost" <pp*****@nospam.hotmail.com>

我有一个看似简单的问题,但我找不到解决方案。我有一个文本框和一个手持式扫描仪来扫描条形码,扫描仪只是生成像键盘一样的按键,所以如果我扫描条形码并且条形码中的
号是4210 ,扫描仪在
4上产生一个按键,而不是在1上,最后在0上。现在我的问题是什么,
正常的条形码' '长度始终是16(所以如果textbox.text =
16
我选择整个文本,以便可以扫描下一个条形码),但如果
用户例如扫描错误的条形码或快速,只生成一段代码,我的文本框长度不到16,文本没有被选中,所以如果他们扫描下一个条形码这个条形码是错误的,因为它填充条形码文本框,直到长度为16,而不是选择文本

继续其余的数字。现在这不是一个大问题
如果用户有鼠标或键盘,但他们只有一台扫描仪。

非常欢迎任何帮助

thnx提前彼得

I''ve got what seems a simple problem, but I can''t find the solution. I''ve
got a textbox and a handheld scanner to scan barcodes, the scanner just
generates keypresses like a keyboard would so if I scan a barcode and the
number from this barcode is 4210, the scanner generates a keypress on the
4
than on the 2 than on 1 and finally on the 0. Now what''s my problem,
normaly
the barcodes'' length always is 16 (so if the length of the textbox.text =
16
I select the entire text so the next barcode can be scanned), but If the
user for example scans the barcode wrong or to fast, only a piece of the
code is generated and my textbox length ain''t 16 and the text doesn''t get
selected, so if they scan a next barcode this barcode is wrong because it
fills the barcode textbox untill the length is 16 than selects the text
and
continues with the remaining numbers. Now this would not be a big problem
if
the user had a mouse or a keyboard but they only have got a scanner.

Any help is very welcome

thnx in advance Peter



您好Cor,


我知道长度属性,你想念的问题是,必须为新扫描选择文本框中的文本以完全覆盖文本框中的

文本,并且'问题是文本框中的完整文本

总是必须被选中,我已经写了一段代码来总是选择

文本框中的整个文本但是问题在于它没有b $ b覆盖所选文本但只添加了文本。如果扫描仪生成输入事件的结束或类似的事情,这将非常简单,但它就像键盘和键盘一样也没有结束

输入东西。


我希望这次我更清楚一点:-)


Greetz Peter


" Cor Ligthert" <无************ @ planet.nl>在消息中写道

news:uj ************** @ TK2MSFTNGP14.phx.gbl ...
Hi Cor,

I know about the length property, the problem you miss is that the text in
the textbox has to be selected for a new scan to completly overwrite the
text in the textbox, and that''s the problem the complete text in the textbox
always has to be selected, I already wrote a piece of code to always select
the entire text in the text box but the problem with that was that it didn''t
overwrite the selected text but just added text to it. This would be very
easy if the scanner generated an end of input event or something like that
but it works just like a keyboard and a keyboard also hasn''t got a end of
input thingy.

I hope the I was a bit clearer this time :-)

Greetz Peter

"Cor Ligthert" <no************@planet.nl> wrote in message
news:uj**************@TK2MSFTNGP14.phx.gbl...
Peter,
我对条形码几乎一无所知。

然而,每个字符串都有一个可以测试的长度属性。

dim a as string =" Hello" <如果a.length<> 16然后''messagebox.show(再次出现错误的扫描
)<​​br />
我的问题是什么?

Cor
" Peter Proost" < pp ***** @ nospam.hotmail.com>
Peter,

I know almost nothing about barcodes.

However every string has a length property what can be tested.

dim a as string = "Hello"
if a.length <> 16 then ''messagebox.show("There is something wrong scan
again")

What do I mis in your problem?

Cor
"Peter Proost" <pp*****@nospam.hotmail.com>

我有一个看似简单的问题,但我找不到解决方案。
我有一个文本框和一个手持式扫描仪来扫描条形码,扫描仪只是生成像键盘一样的按键,所以如果我扫描一个条形码和
这个条形码的数字是4210 ,扫描仪在
上生成一个按键,而不是在2上,而不是在1上,最后在0上。现在我的问题是什么,
正常的条形码' '长度总是16(所以如果textbox.text
= 16的长度我选择整个文本以便可以扫描下一个条形码),但是如果
用户例如扫描错误或快速的条形码,只生成一段代码,我的文本框长度不是16,文本没有被选中,所以如果他们扫描下一个条形码这个条形码是错误的,因为
填充条形码文本框,直到长度为16而不是选择文本

继续其余的数字。现在这不是一个很大的
问题,如果用户有鼠标或键盘,但他们只有扫描仪。

任何帮助都非常欢迎

thnx提前彼得

I''ve got what seems a simple problem, but I can''t find the solution. I''ve got a textbox and a handheld scanner to scan barcodes, the scanner just
generates keypresses like a keyboard would so if I scan a barcode and the number from this barcode is 4210, the scanner generates a keypress on the 4
than on the 2 than on 1 and finally on the 0. Now what''s my problem,
normaly
the barcodes'' length always is 16 (so if the length of the textbox.text = 16
I select the entire text so the next barcode can be scanned), but If the
user for example scans the barcode wrong or to fast, only a piece of the
code is generated and my textbox length ain''t 16 and the text doesn''t get selected, so if they scan a next barcode this barcode is wrong because it fills the barcode textbox untill the length is 16 than selects the text
and
continues with the remaining numbers. Now this would not be a big problem if
the user had a mouse or a keyboard but they only have got a scanner.

Any help is very welcome

thnx in advance Peter




彼得,


你可以提供样品吗

文本框包含''xxxxxxxxxxxxx

扫描仪包含''xxxxxxxxxxxxxxxx


结果文本框必须是''xxxxxxxxxxxxx


知道00值结束了一个可见串但是它仍然包含它。


Cor

" Peter Proost" < pp ***** @ nospam.hotmail.com>
Peter,

Can you give a sample something as
Textbox contains ''xxxxxxxxxxxxx
Scanner contains ''xxxxxxxxxxxxxxxx

Result in textbox has to be ''xxxxxxxxxxxxx

Know that a 00 value ends a visiblestring however it still contains it.

Cor
"Peter Proost" <pp*****@nospam.hotmail.com>
嗨Cor,

我知道长度属性,你想念的问题是文本在
必须选择文本框进行新扫描才能完全覆盖文本框中的文本,这就是
文本框中的完整文本始终存在的问题为了被选中,我已经写了一段代码来总是在文本框中选择
整个文本,但问题是它没有覆盖
选定的文本,但只是添加了文本。如果扫描仪生成输入事件的结束或类似的事情,这将非常容易
但它的工作方式就像键盘和键盘也没有结束
输入好事。

我希望这次我更清楚一点:-)

Greetz Peter

Cor Ligthert <无************ @ planet.nl>在消息中写道
新闻:uj ************** @ TK2MSFTNGP14.phx.gbl ...
Hi Cor,

I know about the length property, the problem you miss is that the text in
the textbox has to be selected for a new scan to completly overwrite the
text in the textbox, and that''s the problem the complete text in the
textbox
always has to be selected, I already wrote a piece of code to always
select
the entire text in the text box but the problem with that was that it
didn''t
overwrite the selected text but just added text to it. This would be very
easy if the scanner generated an end of input event or something like that
but it works just like a keyboard and a keyboard also hasn''t got a end of
input thingy.

I hope the I was a bit clearer this time :-)

Greetz Peter

"Cor Ligthert" <no************@planet.nl> wrote in message
news:uj**************@TK2MSFTNGP14.phx.gbl...
Peter,
我对条形码几乎一无所知。

然而,每个字符串都有一个可以测试的长度属性。

dim a as string =" Hello"
if a.length<> 16然后''messagebox.show(再次出现错误的扫描
)<​​br />
我的问题是什么?

Cor
" Peter Proost" < pp ***** @ nospam.hotmail.com>
Peter,

I know almost nothing about barcodes.

However every string has a length property what can be tested.

dim a as string = "Hello"
if a.length <> 16 then ''messagebox.show("There is something wrong scan
again")

What do I mis in your problem?

Cor
"Peter Proost" <pp*****@nospam.hotmail.com>
>
>我有一个看似简单的问题,但我找不到解决方案。我有>有一个文本框和一个手持扫描仪扫描条形码,扫描仪只是
>如果我扫描条形码并且>生成像键盘一样的按键。该条形码的数字是4210,扫描仪在>上生成按键。 4
>而不是2比1,最后是0.现在我的问题是什么,
> normaly
>条形码的长度始终为16(因此,如果textbox.text => 16
>长度,我选择整个文本,以便可以扫描下一个条形码),但是如果
>
>用户例如扫描条形码错误或快速,只有一块
>
>代码生成,我的文本框长度不是16,文本没有得到>选择,所以如果他们扫描下一个条形码这个条形码是错误的,因为它>填充条形码文本框,直到长度为16,而不是选择文本
>和
>继续剩下的数字。现在这不是一个大问题>如果
>用户有鼠标或键盘,但他们只有扫描仪。
>
>非常欢迎任何帮助
>
> thnx提前彼得
>
>
>
> I''ve got what seems a simple problem, but I can''t find the solution. I''ve > got a textbox and a handheld scanner to scan barcodes, the scanner just
> generates keypresses like a keyboard would so if I scan a barcode and the > number from this barcode is 4210, the scanner generates a keypress on the > 4
> than on the 2 than on 1 and finally on the 0. Now what''s my problem,
> normaly
> the barcodes'' length always is 16 (so if the length of the textbox.text = > 16
> I select the entire text so the next barcode can be scanned), but If
> the
> user for example scans the barcode wrong or to fast, only a piece of
> the
> code is generated and my textbox length ain''t 16 and the text doesn''t get > selected, so if they scan a next barcode this barcode is wrong because it > fills the barcode textbox untill the length is 16 than selects the text
> and
> continues with the remaining numbers. Now this would not be a big problem > if
> the user had a mouse or a keyboard but they only have got a scanner.
>
> Any help is very welcome
>
> thnx in advance Peter
>
>





这篇关于简单的问题......?!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆