捕获文本框中的输入 [英] Capturing input from a textbox

查看:87
本文介绍了捕获文本框中的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试制作一个程序,当有人使用扫描仪扫描

a条形码时,该号码将自动输入到.txt

档案。我厌倦了使用大多数事件,似乎没有人工作。有人有任何想法。我和使用VB.net 2005.谢谢

Hello,

I am trying to make a program that when someone uses a scanner to scan
a barcode that the number will automaticly be entered into a .txt
file. I tired to use the most of the events and none have seemed to
work .Does anyone have any ideas. I and using VB.net 2005. Thank you

推荐答案

我的条码扫描器(Intermec)在文本的末尾添加了一个CRLF

自动,你的可能会这样做。如果你在KeyDown事件中查找

字符,你应该能够获取文本

并使用System.IO命名空间类来编写文件。 br />
Steve C.

MCAD,MCSE,MCP + I,CNE,CNA,CCNA
dt ******* @ dunhamshq.com 写道:
My barcode scanners (Intermec) add a CRLF to the end of the text
automatically, and yours probably does to. If you look for that
character on the KeyDown event, you should be able to pick up the text
and use the System.IO namespace classes to write the file.
Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
dt*******@dunhamshq.com wrote:

您好,


我正在尝试制作一个程序,当有人使用扫描仪扫描

a条形码时,该号码将自动输入.txt

文件。我厌倦了使用大多数事件,似乎没有人工作。有人有任何想法。我和使用VB.net 2005.谢谢
Hello,

I am trying to make a program that when someone uses a scanner to scan
a barcode that the number will automaticly be entered into a .txt
file. I tired to use the most of the events and none have seemed to
work .Does anyone have any ideas. I and using VB.net 2005. Thank you


8月24日上午10:43,Steve< lnuxguy_NOMAIL_PLEA ... @ gmail.comwrote:
On Aug 24, 10:43 am, Steve <lnuxguy_NOMAIL_PLEA...@gmail.comwrote:

我的条形码扫描仪(Intermec)会自动在文本末尾添加一个CRLF

,你可能会这样做。如果你在KeyDown事件中查找

字符,你应该能够获取文本

并使用System.IO命名空间类来编写文件。 br />

史蒂夫C.

MCAD,MCSE,MCP + I,CNE,CNA,CCNA


dterib .. 。@ dunhamshq.com写道:
My barcode scanners (Intermec) add a CRLF to the end of the text
automatically, and yours probably does to. If you look for that
character on the KeyDown event, you should be able to pick up the text
and use the System.IO namespace classes to write the file.

Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA

dterib...@dunhamshq.com wrote:

你好,
Hello,


我正在努力一个程序,当有人使用扫描仪扫描

a条形码时,该号码将自动输入到.txt

文件中。我厌倦了使用大多数事件,似乎没有人工作。有人有任何想法。我和使用VB.net 2005.谢谢 - 隐藏引用的文字 -
I am trying to make a program that when someone uses a scanner to scan
a barcode that the number will automaticly be entered into a .txt
file. I tired to use the most of the events and none have seemed to
work .Does anyone have any ideas. I and using VB.net 2005. Thank you- Hide quoted text -



- 显示引用的文字 -


- Show quoted text -



史蒂夫,


谢谢你的想法。我将不得不尝试一下,看看

发生了什么。

Steve,

Thank you for that idea. I will have to try that out and see what
happens.


dt ******* @ dunhamshq.com 写道:

8月24日,10:上午43点,Steve< lnuxguy_NOMAIL_PLEA ... @ gmail.comwrote:
On Aug 24, 10:43 am, Steve <lnuxguy_NOMAIL_PLEA...@gmail.comwrote:

>我的条码扫描器(Intermec)将CRLF添加到文本末尾
自动,你的可能会这样做。如果你在KeyDown事件中寻找那个
字符,你应该能够获取文本
并使用System.IO命名空间类来编写文件。

史蒂夫C.
MCAD,MCSE,MCP + I,CNE,CNA,CCNA

dterib ... @ dunhamshq.com写道:
>My barcode scanners (Intermec) add a CRLF to the end of the text
automatically, and yours probably does to. If you look for that
character on the KeyDown event, you should be able to pick up the text
and use the System.IO namespace classes to write the file.

Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA

dterib...@dunhamshq.com wrote:

>>您好,
我正在尝试制作一个程序,当有人使用扫描仪扫描条形码时,该号码会自动输入到.txt
文件中。我厌倦了使用大多数事件,似乎没有人工作。任何人都有任何想法。我和使用VB.net 2005.谢谢 - 隐藏引用文本 -
>>Hello,
I am trying to make a program that when someone uses a scanner to scan
a barcode that the number will automaticly be entered into a .txt
file. I tired to use the most of the events and none have seemed to
work .Does anyone have any ideas. I and using VB.net 2005. Thank you- Hide quoted text -


- 显示引用文本 -

- Show quoted text -



Steve,


谢谢你的想法。我将不得不尝试一下,看看

发生了什么。


Steve,

Thank you for that idea. I will have to try that out and see what
happens.



此外,

看一看com端口serialport对象也是如此。

一些新扫描仪是USB,它们有一个驱动程序实际上将一个

com端口分配给扫描仪的USB端口。

所以我所做的就是我让SerialPort听一个comport并刷新

到了topmost应用程序或我需要的任何文本框。


Miro

Also,
Take a look at the com port "serialport" object as well.
Some new scanners are USB and they have a driver that actually assigns a
com port to the USB port of a scanner.
So what I do is I have teh SerialPort listening to a comport and flush
that to the "topmost" application or to whatever textbox I need to.

Miro


这篇关于捕获文本框中的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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