How to create a UCC/EAN128 barcode

Anything related to Barcode ActiveX programming

How to create a UCC/EAN128 barcode

Postby paopaol(legacy member) on Mon Aug 22, 2005 5:57 pm

Hello, I have this barcode: (415)7707176960178(8020)04305900(3900)0000030395(96)20050623 which is compliant UCC/EAN128 and I need to generate the symbol through this morovian activeX in a .net application, I'm using the next code and I'm not getting it right, the code should have 97 bars, and this code is generating a barcode of more than 100 bars.. any idea what the encoding should be?.. or which properties are wrong.. thanks :)

Dim obj As Object
' create BMP file
obj = CreateObject("Morovia.BarcodeActiveX")
obj.Autosize = "0"
obj.ZoomRatio = "1"
obj.BackColor = "16777215"
obj.BorderColor = "0"
obj.BorderStyle = "1"
obj.BorderWidth = "0"
obj.Symbology = MrvBarCdLib.SymbologyEnum.mbxUCC_EAN_128
obj.BarHeight = "200"
obj.BearerBars = False 'False
obj.Measurement = 0
obj.QuietZones = True 'True
obj.Code39OptionalCheckDigit = False 'False
obj.I2of5OptionalCheckDigit = True 'True
obj.Code25OptionalCheckDigit = True 'True
obj.UccEanOptionalCheckDigit = True 'True
'obj.Message = "4157707176960178802000000000390000000000009620050809"
obj.Message = "(415)7707176960178(8020)04305900(3900)0000030395(96)20050623"
obj.NarrowBarWidth = "2"
obj.NarrowToWideRatio = "2"
obj.ShowCheckDigit = "0"
obj.RasterImageResolution = 500
obj.Comment = ""
obj.Comment = "(415)7707176960178(8020)04305900(3900)0000030395(96)20050623"
'obj.Comment = "(415)7707176960178(8020)00000000(3900)0000000000(96)20050809"
obj.CommentAlignment = MrvBarCdLib.AlignmentEnum.mbxAlignCenter
obj.ShowComment = True
obj.CommentOnTop = False
obj.Rotation = MrvBarCdLib.RotationEnum.mbxRTZeroDegree
obj.ShowHRText = False
'obj.ShowHRText = True
'Font
obj.Font.Name = "Arial"
obj.Font.Size = 1.75
obj.Font.Charset = 0
obj.Font.Weight = 400
obj.Font.Underline = False
obj.Font.Italic = False
obj.Font.Strikethrough = False
'Font Comment
obj.CommentFont.Name = "Tahoma"
obj.CommentFont.Size = 2
obj.CommentFont.Charset = 0
obj.CommentFont.Weight = 100
obj.CommentFont.Underline = False
obj.CommentFont.Italic = False
obj.CommentFont.Strikethrough = False
obj.SymbolMarginLeft = 150
obj.SymbolMarginRight = 0
obj.SymbolMarginTop = 0
obj.SymbolMarginBottom = 0

obj.ExportImage("C:\normorovia.bmp", MrvBarCdLib.ImageFormatEnum.mbxFormatBMP)
obj = Nothing
paopaol(legacy member)
 

Re: How to create a UCC/EAN128 barcode

Postby glitch(Legacy Member) on Mon Aug 22, 2005 7:42 pm

It should have 100 bars.

[START-C][FNC1] 41 57 70 71 76 96 01 78 [FNC1]

80 20 04 30 59 00 [FNC1]

39 00 00 00 03 03 95 [FNC1]

96 20 05 06 23 [CHECK] [STOP] [TERM]

Total 33 characters + 1 termination bar. Each code128 character has 3 bars. So total is 33*3+1=100 bars.

Check your previouse code; maybe they did not implement the first FNC1 character.
glitch(Legacy Member)
 


Return to Barcode ActiveX Control

Who is online

Users browsing this forum: No registered users and 1 guest