Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Barcodes


Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2009, 05:40 AM
Cronin3388 Cronin3388 is offline
Newcomer
 
Join Date: Jul 2009
Posts: 2
Default Barcodes


I'm writing a program that prints out barcodes via a thermal receipt printer. The barcodes have to be in Telepen Numeric code which is where i'm having problems. There are many telepen numeric fonts out there, and numerous progrmas that do the encoding for you, but no code!

What I have so far is that I need to have a start character, the message, a check digit, and an end character

The check digit is easy to work out cdigit = message Mod 127

Apparently the start digit is the ascii character for _ and the end digit is the ascii character for Z.

The problem comes with encoding the message as it does not seem as easy as passing the numeric number to the font with the above before and after it as this does not give the correct print out

What seems to be needed is to pass ASCII codes to it in blocks of 2 (i.e. to encode 12 you have to pass the correct character e.g. chr$(12) will give you the number 12.

So I tried the following

Form7.Label1.Caption = Format("_")+chr$(12)+Format(12 Mod 127)+("Z")

and printed it,

BUT it does not seem to give me the correct printout

Does anybody have any experience of working with barcodes and there encoding?

Any help appreciated

James
Reply With Quote
  #2  
Old 07-20-2009, 06:26 AM
Cronin3388 Cronin3388 is offline
Newcomer
 
Join Date: Jul 2009
Posts: 2
Default

OK so I have done some more investigating - obviously the encoding sequence is the 'secret' bit that nobody wants us to know about but it seems that I was right about using ASCII charactrs except you have to start at character 27 (ESC)

so to encode "01" you have to enter ASCII character 28 (FileSep) etc

BUT before everybody stops reading I still have a problem as the check digits don't seem to work quite right - any body got any new ideas? as I have tried this in plain text, without the +27 and with it, but nothing seems to come out correctly

James
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->