vb.net - Windows CE Generate Log on Barcode Scan -
at moment, faced small project update current bar-code system store log file on scan. however, i'm not provided source code current system. thinking maybe can develop small .exe run , it's job store id scanned current timestamp text file named log.txt.
here's i'm provided with:
- a small touchscreen device running on windows ce built-in bar-code scanner (imager) , few other ports including usb port.
- a memory stick containing object codes (exe, dll, pdb, bat , xml) , other multimedia files.
- sdk cd containing sdk platform installer (.msi) requiring vs2005 sp1 installed.
now i'm confused on how job done. i've been spending past 3 days researching this. 1 of google findings suggest bar-code scanner works keyboard input? hence, made simple vb6 application textbox store contents of , reset textbox @ same time when 10-digit id inputted. application not executable in device though (i found out vb6 exe not executable in wince, sadly).
furthermore, tried open ms wordpad in device , attempted scan bar-code. nothing copied wordpad though. thought bar-code scanner works identically keyboard input? mistake? clarification highly appreciated.
i'm new bar-code , wince development , if helps, i'm familiar following languages (in-order): c#, vb6, vb.net, c, java. suggestion on quickest way job done? believe it's not hectic job, i'm stuck on begin.
just tell me in case further clarification needed. in advance!
edit#1:
here's tried far (assuming barcode scan works keyboard input): (using vb.net windows ce 5.0 device under vs2005)
private sub barcodetb_textchanged(byval sender system.object, byval e system.eventargs) handles barcodetb.textchanged if (len(barcodetb.text) = 10) 'if 10 digits id have been scanned.. using writer io.streamwriter = new io.streamwriter("log.txt", true) writer.writeline(barcodetb.text & " " & datetime.now) end using barcodetb.text = "" 'reset textbox end if end sub it works fine when input code manually. nil when tried scan bar-code.
edit#2: there several pdfs provided in website: http://www.scantech-id.com/en/support/download.php?pin=42676d021abeff1e479180ffeb4240e5
i'm sure scanner installed in com3 port if helps! still trying figure out.
edit#3: last attempt: read directly via datareceived com3 port.
i set timer sends data transmitted every 1 second if there's any. works nicely textbox updated when scan bar-code. however, output not in desirable format. doing wrong? see below: 
and here's code:
private sub serialport1_datareceived(byval sender system.object, _ byval e system.io.ports.serialdatareceivedeventargs) _ handles serialport1.datareceived q.enqueue(serialport1.readexisting()) end sub private sub timer1_tick(byval sender system.object, byval e system.eventargs) handles timer1.tick synclock q while q.count > 0 receivedtb.text &= chr(13) & chr(10) & q.dequeue end while end synclock end sub
Comments
Post a Comment