IDAutomation Barcode DLL for Pocket PC Manual
& Tutorial
A license is required for each computer this software
is installed on;
this software may only be used according to the
License Agreement.
|
Our PocketPC DLLs allow easy integration or dynamic barcodes into PocketPC or Windows CE.NET Applications.
They support several linear and two
dimensional barcode symbologies
INDEX:
Using our controls is a simple 3 step process:
Step 1 - download and unzip the control package
Download and unzip the package. We suggest you place the DLL in a local
directory such as C:\IDAutomation that is
easy to remember.
Step 2 - using the control on your Smart Device
NOTE: This documentation refers to our Linear .NET Compact Framework
control.
Please make the following substitutions if using this
document for the PDF417 or DataMatrix Compact Framework controls:
IDAutomaton.design.LinearBarcodeControl.dll =
IDAutomation.design.PDF417BarcodeControl.dll
IDAutomationCFLinear.dll = IDAutomationCFPDF417.dll
IDAutomaton.design.LinearBarcodeControl.dll =
IDAutomation.design.DataMatrixBarcodeControl.dll
IDAutomationCFLinear.dll = IDAutomationCFDataMatrix.dll
There are two components necessary when creating an application for the
.NET Compact Framework (CF). A design time component (IDAutomation.design.LinearBarcodeControl.dll),
which can use all of the functionality of the full .NET Framework, and a run-time component (IDAutomationCFLinear.dll), which uses only
functionality allowed by the Compact Framework. The two components can
be found in the CompactFramework folder of the zip file that was downloaded.
Before the controls can be used in your CF application, they must be placed
in specific locations so that the Visual Studio IDE can find them. Once the DLL's have been copied to the correct locations, they can be
referenced in your application. The following steps outline the
process for setting up your environment to use our Compact Framework
control.
- Copy the designer version of the control,
IDAutomation.design.LinearBarcodeControl.dll, from the zip folder
directory to "C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer". This is the location that the Visual Studio IDE looks
for components for the Device Controls section of the Toolbox.
- Copy the run time version of the control, IDAutomationCFLinear.dll, to
"C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\". This is the location where the Visual Studio IDE looks for the
DLL that will be copied to the target device or PocketPC emulator.
- Add the control to a Smart Device Application project in Visual
Studio.NET
- If the Toolbox is not visible in your application, select View |
Toolbox from the main Visual Studio.NET menu
- Find the section in the Toolbox entitled Device Controls. Right
click the Toolbox and choose Add/Remove Items. A screen similar to the
figure below will appear:

- Click the "Browse" button and navigate to the location where the
designer version of the control was copied to, "C:\Program Files\Microsoft Visual Studio
.NET 2003\CompactFrameworkSDK\v1.0.5000\WindowsCE\Designer", select IDAutomation.design.LinearBarcodeControl.dll,
click "Open", then click "OK"
on the Customize Toolbox dialog.
- The control should appear on the Toolbox as illustrated below:

- Before dragging the control on to a form, a reference
must be set to the run-time version of the control so that it is copied to
the target device or emulator. This is done from Solution Explorer.
If Solution Explorer is not visible, click View | Solution Explorer. Right click
"References" in Solution Explorer. Click "Add Reference".

- On the Add Reference dialog click "Browse". Navigate to the
location of the run time version of the control "C:\Program
Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE", select IDAutomationCFLinear.dll and click
"Open". Click "OK" on the Add
Reference dialog
The control is now available to be used in your Compact Framework
application. The image below displays an example of a simple Compact
Framework application for displaying barcodes on the Pocket PC. Consult
your MSDN documentation for ways to print, save, and display the bitmap
image associated with the Barcode Control for the Compact Framework.

Sizing the control:
The control cannot be sized manually because it must meet specific requirements,
such as a precise X dimension (narrow bar width) and barcode height specified
in the properties of the control. To increase the width, increase the XDimensionCM or XDimensionMILS property. To increase the height, increase the
BarHeightCM property.
Printing from the control:
-
Printing is not natively supported from the Compact Framework. You must use a third party control or the Windows CE API to print
from a .NET Compact Framework application. Consult
the MSDN documentation for ways to print, save, and display the bitmap
image associated with the Barcode DLL for the Compact Framework.
Dynamically placing the control on a form:
-
The barcode can be created on a form with the following code:
IDAutomation.CF.PDF417Barcode.PDF417Barcode pdF417Barcode2 = new
IDAutomation.CF.PDF417Barcode.PDF417Barcode();
this.Controls.Add(pdF417Barcode2);
Copying barcodes to the clipboard:
-
The BMPPicture method may be used with the following code to obtain
an image that can be sent to the clipboard.
Clipboard.SetDataObject(barcode1.BMPPicture);
IDataObject iData = Clipboard.GetDataObject();
pictureBox1.image = (Bitmap)iData.GetData(DataFormats.Bitmap);
Step 3 - adjust the properties of
the control
After you insert the control in your application as described in step 2,
you may adjust the properties of the control. To do this, you can change the
properties with program code or you can right-click on the control and choose Properties
if it is installed on a form.
This section explains the main configuration parameters and methods of the
control:
NOTE: Many of the barcode sizing parameters are calculated in CM
(centimeters). Some barcode measurements are determined in "mils", which are
1/1000 of an inch. You may use the following rules for your conversions:
To convert mils to CM, multiply the mils value by
.00254.
For example, 12 mils * .00254 = .03 CM.
To convert CM to mils, divide the CM value by 2.54.
For example, .03 CM / 2.54 = 11.8 mils.
To convert inches to CM, multiply the value in inches
by 2.54.
Properties:
-
DataToEncode
- this is the data that is to be encoded in the barcode. If you connect the
control to a control source, then the source will override this field.
-
SymbologyID - this is the type of barcode to be used. The default is
Code 128. For more information on barcode types,
visit our barcoding for beginners site.
-
BarHeightCM
- the height of the barcode in CM. Default is 1 CM.
-
leftMarginCM
- the space of the left margin in CM.
-
XDimensionCM - width in centimeters of the
narrow bars. The default is 0.03 CM which is about .012" or 12 mils. You may
need to increase this value if your scanner cannot read barcodes with small X
dimensions. If you have a
high quality laser or CCD scanner, you may decrease this value to
obtain a higher density barcode.
-
XDimensionMILS
- the width in mils (1/1000 of an inch) of the narrow bars.
- Apply Tilde
- this option is only available when the symbology is Code 128, the
character set is AUTO and Apply Tilde is enabled. Default is off. When
Apply Tilde is enabled, the following options are available:
- Encode an ASCII character: the format
~ddd may be used to specify the ASCII code of the character to be encoded. For example, if you enter the following text in the Data field:
66~02977 you
will actually be encoding 66GS77 Where
GS
is a delimiter ASCII 29 character. Other commonly used ASCII codes are ~009 for
a tab and ~013 which is a return function. For encoding other functions, please refer to our
ASCII chart.
-
Encoding UCC/EAN-128:
to encode alpha-numeric UCC/EAN128, the character must be set to "AUTO" for
automatic. Then, ASCII 202 or character Ê is entered as the FNC1 before each AI
and the required start C is included automatically. For example, the UCC number of
(8100)712345(21)12WH5678 should be entered as: Ê8100712345Ê2112WH5678.
In most cases, the AIs will be properly represented in the human readable text.
If the parenthesis is not around the correct number for the AI, enter the
following extended ASCII character as the FNC1 for the correct number of digits
in your AI:
ASCII 212 = 2 digits
ASCII 213 = 3 digits
ASCII 214 = 4 digits
ASCII 215 = 5 digits
ASCII 216 = 6 digits
ASCII 217 = 7 digits
For example, to encode (1277)56, enter Ö127756.
For more information about this, please refer to the
UCC/EAN
128 section of our Code 128 FAQ
- Create a Mod 10 Check digit: to Create a Mod 10 check digit for xx number of characters
add the following to the DataToEncode: ~mnn (where nn
is a 2 digit number representing the number
of characters preceding the tilde in which to base the Mod 10
calculation). The additional MOD 10 check digit is commonly
used in UCC or EAN barcode types. For example, setting the DataToEncode property
to Ê4021234567890123456~m16, will cause a mod 10 check digit to be
created based on all 16 characters before the tilde. The human
readable text and scanned data will display as
(402)12345678901234566. The final 6 is the mod 10 check digit and replaces ~m16.
- Encode hexadecimal representation: to encode the hexadecimal representation of values in a
barcode, add the following to the DataToEncode: ~xnn (where nn
is a 2 digit number, ranging from 01 to 99, representing the number
of characters after nn to convert to their hex equivalent).
For example, setting the DataToEncode property to ABCD~x041234EFGH
would encode in the barcode and scan as ABCD31323334EFGH. Note
that 31, 32, 33, & 34 are the hexadecimal values of 1, 2, 3, & 4,
respectively. Refer to our
ASCII chart for a list of ASCII characters and their hex
equivalents.
- FNC2: When necessary, the FNC2 character may be inserted into
the DataToEncode string by using ASCII 197. For example; Å8012349091.
Our
SC5USB Scanner
can be programmed to hold the barcode starting with the FNC2 in memory
and only transmit it to the computer after scanning a barcode containing
the FNC1.
BMPPicture - use the BMPPicture method to obtain an image
that can be sent to the clipboard. See an
example...
CaptionAbove - text that can be placed above the barcode.
CaptionBelow - text that can be placed below the barcode.
CaptionTopAlignment - the left, right, or center alignment,
in the drawing area, of the text above the barcode.
CaptionBottomAlignment - the left, right, or center
alignment, in the drawing area, of the text below the barcode.
CaptionBottomColor - the color of the font of the caption
below the barcode.
CaptionTopColor - the color of the font of the caption above
the barcode.
CaptionBottomSpace - the distance, in CM, between the human
readable text below the barcode and the caption below the barcode
CaptionFont - the font of the caption above and below the
barcode
CaptionTopSpace - the distance, in CM, between the bottom of
the caption above the barcode and the top of the barcode
CheckCharacter
- automatically adds the check digit to the barcode. The check digit is
required for all symbologies except Code 39, Industrial 2 of 5 and Codabar.
When using symbologies that do not require the check digit, you may disable the
check digit.
CheckCharacterInText
- automatically adds the check digit that is encoded in the barcode
to the human readable text that is displayed. This is not applicable
to Code 128.
CodabarStartCharacter
- the start character for CODABAR. Valid values are "A", "B", "C" or "D".
CodabarStopCharacter - the
stop character for CODABAR. Valid values are "A", "B", "C" or "D".
Code128Set - the set of characters to be used in code128. Valid
values are: AUTO, A, B or C. The default and recommended
selection is AUTO. For more information on
Code 128, review our Code 128
FAQ.
BackColor
- the background color of the barcode.
Font - the font of the text in the barcode.
To change the font in code, use the following syntax for VB .NET:
Barcode1.Font = New Font(New
FontFamily("Arial"), 14)
To only the point size in code, use the following syntax for
VB.NET:
Barcode1.Font = New Font(Barcode1.Font.FontFamily, 14)
ForeColor
- the color of the foreground text and bars in the barcode.
FitControlToBarcode
- if true will automatically size the control canvas to fit the barcode at
design or runtime.
NarrowToWideRatio
- this is the wide to narrow ratio of symbologies that only contain narrow and
wide bars such as Code 39, Interleaved 2 of 5 and MSI. Usually, this value is
between 2 and 3. The default value is 2.
Resolution
- the source that is used to determine the resolution the image is drawn to,
which creates a more accurate barcode. Default is printer. If custom is
selected, the number residing in the ResolutionCustomDPI property will
determine the resolution.
ShowText
- if this value is yes or true, the human readable text will be displayed with
the barcode.
ShowTextLocation - the human-readable text can be placed
above or below the barcode. Default is below.
TextMarginCM
- the distance between the lower portion of the barcode and the text.
TopMarginCM
- the top margin in CM.
UPCESystem - the encoding system to be used for UPC-E, valid values are
0 and 1.
PDF417: Read the
PDF417 FAQ for information about this symbology.
These properties are available only in the 2D version for
idautomation.pdf417.dll. Related properties not mentioned here are the same as in the
Linear Control.
-
ApplyTilde - if set to "true", you can use the format ~ddd to specify
the ASCII code of the character to be encoded. Default is on. Commonly used
ASCII codes are ~009 for a tab and ~013 which is a return function.
-
PDFColumns
- controls the width and height by increasing the number of data columns in the
PDF417 barcode. The default is 0 and the maximum is 30. When this is left at 0,
the control will automatically adjust this setting.
-
PDFErrorCorrectionLevel
- the Reed Solomon error correction level placed in the symbol. More error
correction creates a larger symbol that can withstand more damage. Default = 0
for automatic selection.
-
PDFMode
- the default, (binary mode) encodes bytes of data and text mode encodes all
characters on the US keyboard plus returns and tabs. If you are encoding only
text, text mode can sometimes reduce symbol size.
-
PDFRows - the number of minimum rows in the symbol. If this setting is
left at 0 the control will automatically adjust this setting. We recommend
leaving this alone because the number of rows should be automatically
generated.
-
XtoYRatio - the X multiple height of individual cells; default=3,
usually 2 to 4 times the XDimensionCM
(X).
Methods:
- FontEncoder(string strDataToEncode, int ECCLevel, int NumColumns,
int NumRows, bool truncated, PDFModes inPDFMode, bool inTilde):
returns a string value formatted specifically for the IDAutomation.com
DataMatrix fonts. The parameters are as follows:
- strDataToEncode: The data that should be formatted for the
PDF417 fonts
- ECCLevel: The integer value representing the amount of error
correction that should be applied to the data. A value of 0 tells
the function to figure out the optimum value. Other valid values
are 1 - 8.
- NumColumns: The number of columns in the PDF417 barcode. A
value of 0 tells the function to figure out the optimum number of
columns for the amount of data to be barcoded. Other valid values
are 1 - 90.
- NumRows: The number of rows in the PDF417 barcode. A
value of 0 tells the function to figure out the optimum number of rows
for the amount of data to be barcoded. Other valid values are 1 -
30.
- truncated: Determines if the stop bar and closing row should be
eliminated from the barcode
- inTilde: True or false value indicating if the tilde character
should be interpreted for special processing. See ApplyTilde
above for details concerning the tilde character
Data Matrix: Read the
DataMatrix FAQ for information about this symbology.
These properties are available only in the 2D version for
idautomation.cfdatamatrix.dll. Related
properties not
mentioned here are the same as in the Linear
PocketPC Control.
-
EncodingMode - the encoding mode that compresses information in the
symbol; valid values are, E_ASCII, E_C40, E_TEXT or E_BASE256 (default).
-
ASCII: it is used to encode data that mainly contains ASCII
characters (0-127). It encodes one alphanumeric or two numeric characters per
byte.
-
C40: it is used to encode data that mainly contains numeric and
upper case characters. C40 encodes three alphanumeric data characters into two
bytes.
-
TEXT: it is used to encode data that mainly contains numeric and
lowercase characters. TEXT encodes three alphanumeric data characters into two
bytes.
-
BASE256: it is used to encode bytes of data and 8 bit values.
-
More information about the modes is
documented here.
-
PreferredFormat (DM_FORMAT): sets the preferred format represented by a
number; valid values are from 0 (10X10) to 23 (144X144) and from 24 (8X18) to
29 (16X48); This will be automatically determined if the size of the symbol
chosen is too small. More about this is also documented
here.
-
ProcessTilde - if true ("Y") the tilde (~) will be processed. For
example, you may use ~d032 for a space character, ~d009 for a tab
and ~d013 to encode a return.
-
~dNNN: Represents the ASCII character encoded by the 3 digits NNN. For
example,
~d065 represents the character 'A'.
-
~1: Represents the character FNC1. When FNC1 appears in the first position (or
in the fifth position of the first symbol of a Structured Append), it will
indicate that the data conforms to the UCC/EAN Application Identifier standard
format.
-
More about the tilde formatting is documented
here.
Methods:
- FontEncode(string strDataToEncode, bool blnProcessTilde,
EncodingModes em, PreferredFormats pf): returns a string value
formatted specifically for the IDAutomation.com DataMatrix fonts.
The parameters are as follows:
- strDataToEncode: The data that should be formatted for the
DataMatrix fonts
- blnProcessTilde: True or false value indicating if the tilde
character should be interpreted for special processing. See
ProcessTilde above for details concerning the tilde character
- em: The encoding mode to be applied to the data. This is an
enumeration of the different encoding modes outlined above in the
EncodingMode bullet point
- pf: The size of the matrix that the data should be formatted for.
This is an enumeration of the different formats outlined in the
PreferredFormat bullet point above
Symbology specific notes
UPC-A, UPC-E, EAN-8 and EAN-13
Enter the data to be encoded without any spaces or dashes. You can enter
the +2 and +5 add-on codes by just adding them to the end of the
string. If the check digit is added, it will be ignored and regenerated to
ensure that the code can be scanned. If you rotate the barcode by 270, you may
need to increase the top margin. For UPC-E, you must enter the full 11 or 12
digit UPC-A code and the barcode will be compressed if possible.
POSTNET and PLANET
When using the POSTNET barcode, the XDimensionCM (Narrow Bar Width) of .05
CM should be used. For barcodes to be acceptable to the US post offices, they
must be between 22 and 24 bars per inch. Setting the XDimensionCM to .05 should
produce about 23 bars per inch. You should adjust this setting for your printer
if your results are different.
Code 128
The "AUTO" setting for Code 128 will automatically switch character sets in
the barcode as necessary. Our implementation of Code 128 auto has many options
as described below:
-
Encoding functions such as tabs and returns in Code128:
If ApplyTilde is set to "true", you can use the format ~ddd to specify the
ASCII code of the character to be encoded. For example, Code~009Bar~013
will create a barcode that encodes Code<Tab
Function>Bar<Return Function>. For
other functions, refer to
the ASCII chart.
-
Encoding UCC/EAN-128:
To encode alpha-numeric UCC/EAN-128, the character set is set to "AUTO" for
automatic. Then, ASCII 202 or character Ê is entered as the FNC1 before each AI
and the required start C is also included. For example, the UCC number of
(8100)712345(21)12WH5678 should be entered as: Ê8100712345Ê2112WH5678.
In most cases, the AIs will be properly represented in the human readable text.
If the parenthesis is not around the correct number for the AI, enter the
following extended ASCII character as the FNC1 for the correct number of digits
in your AI:
ASCII 212 = 2 digits
ASCII 213 = 3 digits
ASCII 214 = 4 digits
ASCII 215 = 5 digits
For example, to encode (1277)56, you would enter Ö127756.
-
For more information about this, please refer to the
UCC/EAN 128 section of our Code 128 FAQ or visit the
UCC website.
UCC128
This symbology option encodes an even number of number digits and
includes the FNC1 character in set C as required. Use
Code 128 Auto to encode additional FNC1 codes or data containing text or
odd numbers. Use the UCC128 function only for UCC-128 applications where the
input data is an even number such as in SSCC-18 and SCC-14 barcodes. For
example, to encode an SSCC-18 barcode, you would enter 00000123455555555558
as the data input. For more information, please visit
here.
Technical support
To obtain technical support for this product, please visit the
Dotnet Windows Forms Technical Support Site.
You may also view our
product index to obtain a list of all products we offer.
Copyright © 2000-2006 IDAutomation.com, Inc. IDAutomation and BizFonts are registered trademarks of IDAutomation.com, Inc. All
other trademarks
mentioned are the property of their respective owners.
Over 70% of Fortune 100 companies
use our products to automate their businesses. |