Property: InitialMode

(TBarcode2D_Code16K)

Specifies the initial mode for Code 16K barcode symbology.

Syntax:

type

{ Defined in the pCode16K unit }

TCode16K_EncodeMode = (emAuto, emModeA, emModeB, emModeC, emModeB_FNC1, emModeC_FNC1, emModeC_Shift1B, emModeC_Shift2B, emMode_Extended);

property InitialMode: TCode16K_EncodeMode;

Description:

The property specifies the initial mode for Code 16K barcode symbology. The initial mode indicates the initial code set and may also represent an implied leading FNC1 character or implied leading SHIFT B character as shown in following table. The code set will be automatically switched if a character is encountered that cannot be encoded by current code set. And Implied characters function as if they were actual symbol characters but don not occupy any space.

There are seven kinds of initial mode, from 0 to 6, and a kind of extended data length mode. The initial mode values from emCodeA to emExtended, corresponding to these modes, are defined in the pCode16K unit. These modes and their values are listed in following table:

Initial ModeValueInitial code setImplied characterDescription
0emCodeAA(None)The code set will be automatically switched if another code set character is encountered.
1emCodeBB(None)
2emCodeCC(None)
3emCodeB_FNC1BFNC1
4emCodeC_FNC1CFNC1
5emCodeC_Shift1BCSHIFT BFirst character excepting the message append block (if exists), must be code set B character (ASCII 32 - ASCII 127), otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur. The code set will be automatically switched if another code set character is encountered.
6emCodeC_Shift2BCDouble SHIFT BFirst two characters excepting the message append block (if exists), must be code set B characters (ASCII 32 - ASCII 127), otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur. The code set will be automatically switched if another code set character is encountered.
Extended data length modeemMode_ExtendedBNoneIndicates to create a Code 16K barcode symbol in extended data length mode. An extended data length mode block is required, and it should be placed at beginning of barcode text, otherwiset the OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur. See also the "Extended data length mode" section in the "TBarcode2D_Code16K" article.

The property can be one of these values: emModeA, emModeB, emModeC, emModeB_FNC1, emModeC_FNC1, emModeC_Shift1B, emModeC_Shift2B, and emMode_Extended, corresponding to the initial modes 0 to 6, and the extended data length mode. In this case, it specifies the factual initial mode shown in table above.

Also, the InitialMode property can be set to emAuto (defined in the pCode16K unit), in this case, one of values from emCodeA to emModeC_Shift2B, corresponding to the initial modes 0 to 6 shown in table above will be selected automatically, depending on the barcode text, in order to minimize the symbol size.

You can always use the CurrentMode property to get the factual initial mode.

See also the "Initial modes" section in the "TBarcode2D_Code16K" article.

Contents