Printing bar codes using the ? or ?? command

Read this section if you wish to use the print commands ? or ?? to print text and bar codes. The ? and ?? commands send the results to the main Visual FoxPro window, an active user-defined window, or the printer.

Example: This example uses function CIA_ITF_A() to create an Interterleaved 2-of-5 bar code (with an added check digit). BARCODE will contain the text necessary to print the bar code (using a bar code font).

Function CIA_ITF_HA() is used to create the Human Readable Text with an added check digit (usually this is printed below the bar code, using Arial font).


DATA = "3948750001"



See Bar code functions for a complete list of all the different bar code functions, used to create any type of bar code. For example - use function CIA_ITF() to create Interleaved 2-of-5 (ITF) bar codes, use function CIA_ITF_A() to create Interleaved 2-of-5 (ITF) bar codes with added check digit, use function CIA_CODE128() to create Code 128 bar codes, etc.

See Bar code font name and font size to use for details about which bar code font to use (to print the result of the bar code function). For example, to print Interleaved 2-of-5 bar codes use function CIA_ITF() and use font name CIA ITF Medium and font size 14. To print Code 128 bar codes use function CIA_CODE128() and use font name CIA Code 128 Medium and font size 14.

You can easily extend the above example to calculate the bar codes you require.

To give your application access to functions in a library, use the SET LIBARARY command.


See: Using the SET LIBRARY command



Copyright 2000 CIA (BAR CODES) UK. All rights reserved. Reproduction prohibited.