This blog is subject the DISCLAIMER below.

Monday, February 18, 2008

A common bar-code problem

A tiny detail that is usually missed when working with bar-codes (written in fonts like: "3 of 9 Extended", etc) is writing the bar-code text between brackets or asterisks:

myLabel.Text = "*"+myBarcode+"*";


myLabel.Text = "("+myBarcode+")";

Forgetting using one of the above ways makes the code unreadable by bar-code readers..


Mohamed Gamal El-Den said...

Thanks Shady, But Would you Please explain in More details ??
hint:- i didn't work in anything related to barcode, but i want to know more.

sh@dy said...

First let me clarify that this tip is concerned with printing (on paper, screen.. or whatever) a barcode that can be read by common barcode readers without facing problems..

That can be easily done by getting a "barcode" font (There're many, for free & commercial, just google 'barcode font', & u'll get like a 1000 of them. I use "3 of 9 Extended" & find it very easy to use, not to mention that it's available for free..) & using it as ur label's or text box font..

Assigning any string to the label will show u the barcode alternative for your string.. The problem is that barcode alternative is not readable by barcode readers without adding the braces or asterisks as I told u above..

sh@dy said...

Feel free to ask about the issue I just didn't get what u really want to know..