连接条形码扫描枪后,如何在程序中实现将扫描枪扫描的条形码显示在指定的edit控件中? 不知哪位大侠能否指点一二,高分相送:连接条形码扫描枪后,如何在程序中实现将扫描枪扫描的条形码显示在指定的edit控件中?谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你要显示的应该是扫描出来的值吧,什么都不用作,只要焦点在edit上就好了.相当于键盘的输入阿. CODE39码的编码规则是: 1、 每五条线表示一个字符; 2、 粗线表示1,细线表示0; 3、 线条间的间隙宽的表示1,窄的表示0; 4、 五条线加上它们之间的四条间隙就是九位二进制编码,而且这九位中必定有三位是1,所以称为39码; 5、 条形码的首尾各一个*标识开始和结束 strBarTable(0) = "001100100" ' 0 strBarTable(1) = "100010100" ' 1 strBarTable(2) = "010010100" ' 2 strBarTable(3) = "110000100" ' 3 strBarTable(4) = "001010100" ' 4 strBarTable(5) = "101000100" ' 5 strBarTable(6) = "011000100" ' 6 strBarTable(7) = "000110100" ' 7 strBarTable(8) = "100100100" ' 8 strBarTable(9) = "010100100" ' 9 strBarTable(10) = "100010010" ' A strBarTable(11) = "010010010" ' B strBarTable(12) = "110000010" ' C strBarTable(13) = "001010010" ' D strBarTable(14) = "101000010" ' E strBarTable(15) = "011000010" ' F strBarTable(16) = "000110010" ' G strBarTable(17) = "100100010" ' H strBarTable(18) = "010100010" ' I strBarTable(19) = "001100010" ' J strBarTable(20) = "100010001" ' K strBarTable(21) = "010010001" ' L strBarTable(22) = "110000001" ' M strBarTable(23) = "001010001" ' N strBarTable(24) = "101000001" ' O strBarTable(25) = "011000001" ' P strBarTable(26) = "000110001" ' Q strBarTable(27) = "100100001" ' R strBarTable(28) = "010100001" ' S strBarTable(29) = "001100001" ' T strBarTable(30) = "100011000" ' U strBarTable(31) = "010011000" ' V strBarTable(32) = "110001000" ' W strBarTable(33) = "001011000" ' X strBarTable(34) = "101001000" ' Y strBarTable(35) = "011001000" ' Z strBarTable(36) = "000111000" ' - strBarTable(37) = "100101000" ' % strBarTable(38) = "010101000" ' $ strBarTable(39) = "001101000" ' * 直接聚焦edit1,然后接上扫描枪即可了,什么都不需要你搞;象键盘一样的。 你希望的是把条形码本身显示出来吧,如果是这样的,要使用office 提供的一个ocx控件如果是单纯显示条形码的值,那什么都不需要干,聚焦edit1,然后接上扫描枪即可 OleContainer打开word后,如果屏蔽Ribbon菜单下的某些功能 请教delphi2010中idhttp控件的问题 大家看看这段语句为什么又错误? “灾难性故障”有哪些可能? 现在学PB有没有前(钱)途? NewInstance的疑惑 嵌入IE中 关于数据统计的问题。。怎么统计DBGrid里的数据?!?!?(请教)。在线等~ 为什么消息死循环退不出来?高手请指教 按日期查询 查不到结果 哪有delphi好书可以下载呀? 大家救命呀!小弟在作统计时遇到麻烦了~~~~~
相当于键盘的输入阿.
strBarTable(0) = "001100100" ' 0 strBarTable(1) = "100010100" ' 1 strBarTable(2) = "010010100" ' 2 strBarTable(3) = "110000100" ' 3 strBarTable(4) = "001010100" ' 4 strBarTable(5) = "101000100" ' 5 strBarTable(6) = "011000100" ' 6 strBarTable(7) = "000110100" ' 7 strBarTable(8) = "100100100" ' 8 strBarTable(9) = "010100100" ' 9 strBarTable(10) = "100010010" ' A strBarTable(11) = "010010010" ' B strBarTable(12) = "110000010" ' C strBarTable(13) = "001010010" ' D strBarTable(14) = "101000010" ' E strBarTable(15) = "011000010" ' F strBarTable(16) = "000110010" ' G strBarTable(17) = "100100010" ' H strBarTable(18) = "010100010" ' I strBarTable(19) = "001100010" ' J strBarTable(20) = "100010001" ' K strBarTable(21) = "010010001" ' L strBarTable(22) = "110000001" ' M strBarTable(23) = "001010001" ' N strBarTable(24) = "101000001" ' O strBarTable(25) = "011000001" ' P strBarTable(26) = "000110001" ' Q strBarTable(27) = "100100001" ' R strBarTable(28) = "010100001" ' S strBarTable(29) = "001100001" ' T strBarTable(30) = "100011000" ' U strBarTable(31) = "010011000" ' V strBarTable(32) = "110001000" ' W strBarTable(33) = "001011000" ' X strBarTable(34) = "101001000" ' Y strBarTable(35) = "011001000" ' Z strBarTable(36) = "000111000" ' - strBarTable(37) = "100101000" ' % strBarTable(38) = "010101000" ' $ strBarTable(39) = "001101000" ' *
如果是单纯显示条形码的值,那什么都不需要干,聚焦edit1,然后接上扫描枪即可