Standard or higher

Barcode object: Methods

Access and automate the barcode object features.

CopyToClipboard Method


CopyToClipboard : bool
Copies the barcode in meta graphic format to the clipboard. Returns TRUE if successful.

CopyToClipboardBySize Method


CopyToClipboardBySize (Width: Integer, Height: Integer): Bool
Copies the barcode in meta graphic format to the clipboard. The size of the barcode is specified by the arguments width and height. Returns TRUE if successful.

CreatePictureBySize Method


CreatePictureBySize (Width: Integer, Height: Integer): Bool
Allows a custom sized Picture property to be handled. The size of the barcode picture is specified by the arguments width and height. Returns TRUE if successful.

SaveAsBySizeExtended Method


SaveAsBySizeExtended (path: WideString, Width: Integer, Height: Integer, Format: Integer, ColorDepth: Integer, Transparent: Integer, Flags: Integer, Angle: Integer, DPI: Integer): Smallint
Extended version of the SaveAsBySize Method.

SetDemoText Method


SetDemoText
Sets the property Text to a valid default value. Use this for demonstration or test purposes to get a valid code.

BinaryWriteAsPNGBySize Method


BinaryWriteAsPNGBySize (Width: Integer, Height: Integer): OleVariant
Returns the current barcode in binary PNG image format. The size is specified by Width and Height parameters. This method is only available in the Enterprise Edition.

BinaryWriteAsPNG Method


BinaryWriteAsPNG : OleVariant
Returns the current barcode in current size binary PNG image format. This method is only available in the Enterprise Edition.

AboutBox Method


AboutBox
Opens the info dialog of ActiveBarcode and shows the version and other details.

SaveAsPNG Method


SaveAsPNG (path: WideString): Smallint
Saves the current barcode as PNG image file. The image size is the current size of the control.

SaveAsPNGBySize Method


SaveAsPNGBySize (path: WideString, Width: Integer, Height: Integer): Smallint
Saves the current barcode as PNG image file. The image size is specified by the paramters width and height.

Supported image file formats

The functions SaveAs, SaveAsBySize and SaveAsBySizeExtended of the ActiveBarcode Control support different image formats and color depths:

ActiveBarcode: Windows Bitmap
Windows Bitmap
Extension: BMP
Format #: 0
1-bit s/w: ✔
8-bit: ✔
16-bit: ✔
24-bit: ✔
32-bit: ✔ default
Bitmap graphics
ActiveBarcode: JPEG
JPEG
Extension: JPG, JPEG
Format #: 2
1-bit s/w: ✕
8-bit: gray
16-bit: ✕
24-bit: ✔ default
32-bit: ✕
Bitmap graphics
ActiveBarcode: Portable Network Graphic
Portable Network Graphic
Extension: PNG
Format #: 13
1-bit s/w: ✔
8-bit: ✔
16-bit: ✕
24-bit: ✔ default
32-bit: ✔
Bitmap graphics
ActiveBarcode: TIFF
TIFF
Extension: TIF
Format #: 18
1-bit s/w: ✔
8-bit: ✔
16-bit: ✕
24-bit: ✔ default
32-bit: ✔
Bitmap graphics
ActiveBarcode: Targa
Targa
Extension: TGA
Format #: 17
1-bit s/w: ✕
8-bit: ✔
16-bit: ✔
24-bit: ✔ default
32-bit: ✔
Bitmap graphics
ActiveBarcode: GIF
GIF
Extension: GIF
Format #: 25
1-bit s/w: ✔
8-bit: ✔ default
16-bit: ✕
24-bit: ✕
32-bit: ✕
Bitmap graphics
ActiveBarcode: Windows Metafile Format
Windows Metafile Format
Extension: WMF
Format #: 101
1-bit s/w: ✕
8-bit: ✕
16-bit: ✕
24-bit: ✔ default
32-bit: ✕
Vector graphics
ActiveBarcode: Enhanced Metafile Format
Enhanced Metafile Format
Extension: EMF
Format #: 100
1-bit s/w: ✕
8-bit: ✕
16-bit: ✕
24-bit: ✔ default
32-bit: ✕
Vector graphics
ActiveBarcode: Wireless Bitmap
Wireless Bitmap
Extension: WBM, WBMP
Format #: 19
1-bit s/w: ✔ default
8-bit: ✕
16-bit: ✕
24-bit: ✕
32-bit: ✕
Bitmap graphics
ActiveBarcode: Portable Bit Map
Portable Bit Map
Extension: PBM
Format #: 7
1-bit s/w: ✔ default
8-bit: ✕
16-bit: ✕
24-bit: ✕
32-bit: ✕
Bitmap graphics
ActiveBarcode: Portable Gray Map
Portable Gray Map
Extension: PGM
Format #: 11
1-bit s/w: ✕
8-bit: gray/default
16-bit: ✕
24-bit: ✕
32-bit: ✕
Bitmap graphics
ActiveBarcode: Portable Pixel Map
Portable Pixel Map
Extension: PPM
Format #: 14
1-bit s/w: ✕
8-bit: ✕
16-bit: ✕
24-bit: ✔ default
32-bit: ✕
Bitmap graphics
ActiveBarcode: X Pix Map
X Pix Map
Extension: XPM
Format #: 23
1-bit s/w: ✕
8-bit: ✕
16-bit: ✕
24-bit: ✔ default
32-bit: ✕
Bitmap graphics

Color depths marked as default are used when you use the SaveAs, SaveAsBySize function or when you set the color depth to zero when using the function SaveAsBySizeExtended.

Color depths for image files

Supported color depths are:

Colordepth Description
1 1-bit monochrome, the image will be b/w.
8 8-bit colours or grayscale depending on the image format
16 16-bit TrueColor
24 24-bit TrueColor
32 32-bit TrueColor

Please note that not every color depth is available for every image file format.

Supported flags for image files

You can use the following flags when saving image files:

Image format Flag Description
BMP 0x1 Saves the bitmap as RLE (Run Length Encoded)
JPEG 0x80
0x100
0x200
0x400
0x800
JPEG quality "Super" (100%)
JPEG quality "Good" (75%)
JPEG quality "Normal" (50%)
JPEG quality "Average" (25%)
JPEG quality "Poor" (10%)

DPI settings

When saving as JPEG, PNG, TIFF or BMP image format you can set the DPI (Dots per Inch), if you are using the SaveAsBySizeExtended method.