|
BarCodeWiz ActiveX Component Programming Reference
|
BackColor |
|
Returns or sets the background color of BarCodeWiz.
The BackColor property is ignored if the BackStyle property
setting is 0 (Transparent).
For maximum readabilty by bar code scanners, BackColor should
be in high contrast with ForeColor. |
|
Syntax
BarCodeWiz1.BackColor [ = color]
The settings for color are
Setting |
Description |
Normal RGB colors |
Colors specified by using the Color palette or
by using the RGB or QBColor functions in code. |
System Default colors |
Colors specified by system color constants listed
in the Visual Basic (VB) object library in the Object Browser. |
|
|
BackStyle |
|
Returns or sets the background style of BarCodeWiz.
The BackColor property is ignored if the BackStyle property
setting is 0 (Transparent). |
|
Syntax
BarCodeWiz1.BackStyle [ = number]
The settings for number are
Constant |
Setting |
Description |
Transparent |
0 |
Background color and any graphics are visible
behind the control. |
Opaque |
1 |
The control's BackColor property setting fills
the control and obscures any color or graphics behind it. |
|
|
Barcode |
|
Returns or sets the value of Barcode.
This value cannot be empty. |
|
Syntax
BarCodeWiz1.Barcode [ = string]
Keep in mind that not all symbologies (types of bar codes) support
all ASCII values. For example, Code 128 C supports numbers only.
See Symbology for more details.
|
|
BarcodeHeight |
|
Returns or sets the height of
the bar code (bars only - not the full component). This value cannot
be zero. BarcodeHeight is measured in HiMetric units (0.01
millimeter) for highest accuracy.
1 inch = 2540 * 0.01 millimeter |
|
Syntax
BarCodeWiz1.BarcodeHeight [ = number]
|
|
BarcodeTextPosition |
|
Returns or sets the position of
the bar code text (human readeable) in relation to the bar code. |
|
Syntax
BarCodeWiz1.BarcodeTextPosition [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
None |
0 |
Text is not displayed. |
|
Top_Left |
1 |
Text is positioned above the bar
code, left-aligned. |
|
Top_Right |
2 |
Text is positioned above the bar
code, right-aligned. |
|
Top_Center |
3 |
Text is positioned above the bar
code, center-aligned. |
|
Bottom_Left |
4 |
Text is positioned below the bar
code, left-aligned. |
|
Bottom_Right |
5 |
Text is positioned below the bar
code, right-aligned. |
|
Bottom_Center |
6 |
Text is positioned below the bar
code, center-aligned. |
|
BearerBars |
|
Returns or sets the value indicating
whether BearerBars are displayed. Bearer Bars are two horizontal lines
on top and bottom of a bar code, which may be used to increase scanning
accuracy of certain symbologies. Most commonly, they are used with
Interleaved 2 of 5. |
|
Syntax
BarCodeWiz1.BearerBars [ = boolean]
The settings for boolean are
|
|
Setting |
Description |
|
True |
Bearer bars are displayed. |
|
False |
Bearer bars are not
displayed. |
|
Border |
|
Returns or sets the border surrounding
BarCodeWiz. |
|
Syntax
BarCodeWiz1.BarcodeTextPosition [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
No_Border |
0 |
Border is not displayed. |
|
Thin_Solid |
1 |
Thin, rectangular border. |
|
Thin_Dash |
2 |
Thin, rectangular border with
dashed lines. |
|
Thin_Dot |
3 |
Thin, rectangular border with
dotted lines. |
|
Thin_DashDot |
4 |
Thin, rectangular border with
dash-dotted lines. |
|
Thin_Rd_Solid |
5 |
Thin border with rounded edges.
|
|
BottomText |
|
Returns or sets the value of BottomText.
|
|
Syntax
BarCodeWiz1.BottomText [ = string]
In order to hide the BottomText line, set string to
an empty value.
|
|
BottomTextAlign |
|
Returns or sets the horizontal
alignment of BottomText. This property has no effect when BottomText
is empty. |
|
Syntax
BarCodeWiz1.BottomTextAlign [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
Left |
0 |
BottomText is aligned with
the left side of the bar code. |
|
Right |
1 |
BottomText is aligned with
the right side of the bar code. |
|
Center |
2 |
BottomText is in the center,
above the bar code. |
|
ForeColor |
|
Returns or sets the foreground color of BarCodeWiz.
This property affects the color of the bar code, text, bearer bars
and the border.
For maximum readabilty by bar code scanners, BackColor should
be in high contrast with ForeColor. |
|
Syntax
BarCodeWiz1.ForeColor [ = color]
The settings for color are
Setting |
Description |
Normal RGB colors |
Colors specified by using the Color palette or
by using the RGB or QBColor functions in code. |
System Default colors |
Colors specified by system color constants listed
in the Visual Basic (VB) object library in the Object Browser. |
|
|
NarrowBarWidth |
|
Returns or sets the width of the
narrowest bar in the bar code. This value cannot be zero. NarrowBarWidth
is measured in HiMetric units (0.01 millimeter) for highest accuracy.
1 inch = 2540 * 0.01 millimeter |
|
Syntax
BarCodeWiz1.NarrowBarWidth [ = number]
In order to preserve excellent scaling ability, many measurements
in BarCodeWiz depend on the NarrowBarWidth value. For example
QuietZone property defines its Medium_Zone setting as 15
times the NarrowBarWidth. Because of this, keep in mind that by
changing NarrowBarWidth you may also change the overall size
of the component.
|
|
OptionalCheckChar |
|
An optional checksum character
may be calculated and added in order to increase scanning accuracy
of a bar code. This property affects Code 39, Code 39 Extended, Interleaved
2 of 5, and Standard 2 of 5.
Note that many symbologies (such ase UPC-A) require an already-calculated
checksum character. Do not use OptionalCheckChar property for
that purpose -- it will be ignored. BarCodeWiz will verify the supplied
checksum character, and will notify you if incorrect. |
|
Syntax
BarCodeWiz1.OptionalCheckChar [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
No_Check_Char |
0 |
Optional checksum
character is not used. |
|
Barcode_Only |
1 |
Optional checksum
character is encoded into the bar code, but not shown in text. |
|
Barcode_And_Text |
2 |
Optional checksum
character is encoded into the bar code as well as shown in text. |
|
Orientation |
|
Returns or sets the
orientation of the component in degrees.
Multiples of 90 may be used (ie. 360 is equivalent to 0 degrees) |
|
Syntax
BarCodeWiz1.Orientation [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
Degrees_0 |
0 |
Default orientation.
Component is not rotated. |
|
Degrees_90 |
90 |
Component is shown
at 90 degrees angle (counter-clockwise). |
|
Degrees_180 |
180 |
Component is shown
upside-down, at 180 degrees angle. |
|
Degrees_270 |
270 |
Component is shown
at 270 degrees angle (counter-clockwise). |
|
Picture |
|
Returns
the image of the component (this is a read-only property, not available
at design-time). You may use this property to output a bar code to
printer. |
|
Syntax
BarCodeWiz1.Picture
Visual Basic Examples
Example 1. Send a bar code image to your printer. It will print
the bar code in the top left position on the page (0,0).
Printer.PaintPicture BarCodeWiz1.Picture,
0, 0
Printer.EndDoc
Example 2. Set the Picture property of a PictureBox (named Picture1)
to that of BarCodeWiz1.
Picture1.Picture = BarCodeWiz1.Picture
|
|
QuietZone |
|
Returns or sets the horizontal
clear space around the bar code. Quiet zone may be required for higher
bar code readability. |
|
Syntax
BarCodeWiz1.QuietZone [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
No_Zone |
0 |
No quiet zone. |
|
Smallest_Zone |
1 |
Horizontal quiet zone is equal
to 5 times NarrowBarWidth. |
|
Small_Zone |
2 |
Horizontal quiet zone is equal
to 10 times NarrowBarWidth. |
|
Medium_Zone |
3 |
Horizontal quiet zone is equal
to 15 times NarrowBarWidth. |
|
Large_Zone |
4 |
Horizontal quiet zone is equal
to 20 times NarrowBarWidth. |
|
Largest_Zone |
5 |
Horizontal quiet zone is equal
to 25 times NarrowBarWidth. |
|
StretchBarcodeText |
|
Returns or sets the
value indicating whether the human readable bar code text is stretched
to match the width of the bar code itself. |
|
Syntax
BarCodeWiz1.StretchBarcodeText [ = boolean]
The settings for boolean are
|
|
Setting |
Description |
|
True |
Text is stretched
to match the width of the bar code. Horizontal alignment in BarcodeTextPosition
is ignored. |
|
False |
Text is drawn without
changes. |
|
Symbology |
|
Returns or sets the type of bar code to
be used. |
|
Syntax
BarCodeWiz1.Symbology [ = number]
The settings for number are
Constant |
Setting |
Description |
Code_39 |
0 |
Most commonly used non-retail symbology. Note
that the leading and trailing asterisks (*) are added automatically,
if not supplied.
Characters allowed:
0-9; A-Z; -.$*/+%, and space |
Code_39_Extended |
1 |
Allows all ASCII 128 characters to be encoded
by using a double-character format. Most scanners will need
to be switched to the extended mode in order to recognize this. |
Code_128_A
|
2 |
Allows all ASCII values between 0 and 96. This
includes special characters, such as tab or escape. |
Code_128_B |
3 |
Allows all ASCII values between 32 and 127.
(Unlike Code 128 A, it allows the use of lower-case letters) |
Code_128_C |
4 |
High density, numeric only |
Code_128_Auto |
5 |
Automatically chooses the best Code 128 subset. |
Interleaved_2of5 |
6 |
Hight density, numeric only symbology. Must have
an even number of digits. |
Standard_2of5 |
7 |
Numeric-only, low density. Commonly used in libraries,
blood banks, and parcels. |
Code_93 |
8 |
Superset of Code 39. If required, it switches
to Code 93 Extended automatically. |
Code_11 |
9 |
Uses numbers 0-9 and the dash symbol "-" |
Codabar |
10 |
Numeric-only symbology. Each bar code, however,
must start and end with the letters A,B,C or D. |
UPC_A |
11 |
Used in retail environments in North America |
UPC_E |
12 |
Shorter version of UPC-A. Not all UPC-A numbers
can be converted to UPC-E |
EAN_13 |
13 |
Used in retail environments outside of North America.
|
EAN_8 |
14 |
Similar to EAN 13, but EAN 8 numbers are not derived
from EAN 13 (as is the case with UPC). |
|
|
TopText |
|
Returns or sets the
value of TopText. |
|
Syntax
BarCodeWiz1.TopText [ = string]
In order to hide the TopText line, set string to an
empty value.
|
|
TopTextAlign |
|
Returns or sets the
horizontal alignment of TopText. This property has no effect when
TopText is empty. |
|
Syntax
BarCodeWiz1.TopTextAlign [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
Left |
0 |
TopText is
aligned with the left side of the bar code. |
|
Right |
1 |
TopText is
aligned with the right side of the bar code. |
|
Center |
2 |
TopText is
in the center, above the bar code. |
|
WideToNarrowRatio |
|
Returns or sets the ratio of the
wide to narrow bar in a bar code. This property affects Code 39, Code
39 Extended, Interleaved 2of5, Standard 2of5, and Codabar only (these
symbologies only use two bar widths). |
|
Syntax
BarCodeWiz1.WideToNarrowRatio [ = number]
The settings for number are
|
|
Constant |
Setting |
Description |
|
Optimal_Ratio |
0 |
No quiet zone. |
|
Smallest_Ratio |
1 |
Width of the wide bar is equal
to 2 times NarrowBarWidth. |
|
Small_Ratio |
2 |
Width of the wide bar is equal
to 2.25 times NarrowBarWidth. |
|
Medium_Ratio |
3 |
Width of the wide bar is equal
to 2.5 times NarrowBarWidth. |
|
Large_Ratio |
4 |
Width of the wide bar is equal
to 2.75 times NarrowBarWidth. |
|
Largest_Ratio |
5 |
Width of the wide bar is equal
to 3 times NarrowBarWidth. |
|
CopyToClipboard |
|
This
method stores the current image into the clipboard as an enhanced
metafile.
You may paste this image into virtually any programs accepting Clipboard
input by pressing Ctrl+V or by selecting Edit->Paste from the menu. |
|
Syntax
BarCodeWiz1.CopyToClipboard
|
|
SaveAs |
|
This
method saves the current image to disk as an enhanced- or a Windows
metafile.
|
|
Syntax
BarCodeWiz1.SaveAs (ByVal pathname As String)
pathname is a string expression specifying the path and filename
of the file. The type of file is determined by its three-letter
extension. Possible file extensions are wmf and emf (the latter
is recommended).
The following example shows how to create 100 bar codes images (values
from 1000 to 1099) in Visual Basic:
Dim x As Integer
For x = 0 To 99
BarCodeWiz1.Barcode = 1000 + x
BarCodeWiz1.SaveAs "c:\images\" & 1000
+ x & ".emf"
Next
|
|