Search Results for

    Show / Hide Table of Contents

    Class Barcode128

    Generates the Code128 barcode.

    Inheritance
    System.Object
    BarcodeBase
    LinearBarcodeBase
    Barcode128
    BarcodeEAN128
    Inherited Members
    LinearBarcodeBase.CalcCheckSum
    LinearBarcodeBase.WideBarRatio
    LinearBarcodeBase.Trim
    LinearBarcodeBase.DrawBarcode(IGraphics, RectangleF)
    BarcodeBase.Name
    BarcodeBase.Color
    BarcodeBase.Font
    BarcodeBase.Clone()
    BarcodeBase.GetDefaultValue()
    Namespace: FastReport.Barcode
    Assembly: FastReport.Base.dll
    Syntax
    public class Barcode128 : LinearBarcodeBase
    Remarks

    This barcode supports three code pages: A, B and C. You need to set appropriate code page in the barcode text, or use the auto encode feature. See the AutoEncode property for more details.

    Examples

    This example shows how to configure the BarcodeObject to display Code128 barcode.

    BarcodeObject barcode;
    ...
    barcode.Barcode = new Barcode128();
    (barcode.Barcode as Barcode128).AutoEncode = false;

    Constructors

    Barcode128()

    Initializes a new instance of the Barcode128 class with default settings.

    Declaration
    public Barcode128()

    Properties

    AutoEncode

    Gets or sets a value that determines whether the barcode should automatically use appropriate encoding.

    Declaration
    public bool AutoEncode { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    You may use this property to encode data automatically. If you set it to false, you must specify the code page inside the data string. The following control codes are available:

    SequenceCode128 control code
    &A;START A / CODE A
    &B;START B / CODE B
    &C;START C / CODE C
    &S; SHIFT &1; FNC1 &2; FNC2 &3; FNC3 &4; FNC4

    Examples

    The following example shows how to specify control codes:

    BarcodeObject barcode;
    barcode.Barcode = new Barcode128();
    (barcode.Barcode as Barcode128).AutoEncode = false;
    barcode.Text = "&C;1234&A;ABC";

    IsNumeric

    Gets the value indicating that the barcode is numeric.

    Declaration
    public override bool IsNumeric { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LinearBarcodeBase.IsNumeric

    Methods

    Assign(BarcodeBase)

    Assigns properties from other, similar barcode.

    Declaration
    public override void Assign(BarcodeBase source)
    Parameters
    Type Name Description
    BarcodeBase source

    Barcode object to assign properties from.

    Overrides
    LinearBarcodeBase.Assign(BarcodeBase)
    Back to top © 1998-2025 Copyright Fast Reports Inc.