Print Preview ActiveX Active Users: 23 / Visits Today: 292
Highest Active Users: 83
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Help file
 AddBarCode - Method
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic: AddFrame - Method Topic Next Topic: AddReference - Method  


327 Posts

Posted - 07/13/2005 :  17:58:02  Show Profile
Method AddBarCode


This method adds various types of barcode to the current frame, but prints accordingly the printer's barcode support.


AddBarCode (strData As String, vBarCodeType As BarCodeType, lXpos As Long, lYpos As Long, lWidth As Long, lHeight As Long)

Parameter       Description                                                   
  • strData Data used to generate bar code
  • vBarCodeType Type of barcode to be displayed
  • lXpos Left position for bar code in twips
  • lYpos Top position for bar code in twips
  • lWidth Width of barcode in twips
  • lHeight Height of bar code in twips

    The vBarCodeType parameter can contain the following values or represented by the constants:
    Constant     Value  Description                                                    
  • prCodaBar 0 Older code often used in library systems, sometimes in bloodbanks
  • prCode39 1 Characters and numbers
  • prEAN8 2 Compressed EAN code for small products
  • prEAN13 3 Retail products non-USA (numbers only)
  • prITF 4 The UPC Shipping Container Symbol is used to mark cartons, cases, r pallets that contain products which have a UPC or EAN product identification number
  • prPostNet 5 Used by U.S. Postal for automated mail sorting
  • prUPCA 6 Retail products USA and Canada (numbers only)
  • prUPCE 7 Compressed version of UPC code for small products

    Some barcodes need to have the obligatory number of figures.

    The bar code is added to the page at the specified position and to the size defined by lWidth and lHeight. The vBarCodeType parameter selects which standard for bar codes is to be used.

    At the end of the method, the properties CurrentX and CurrentY are set to the position specified in the parameters.


    To add a bar code from standard EAN13:

    lXpos = Preview.ConvertToTwip(prCentimeter, 2)
    lYpos = Preview.ConvertToTwip(prCentimeter, 2)
    lWidth = Preview.ConvertToTwip(prCentimeter, 5)
    lHeight = Preview.ConvertToTwip(prCentimeter, 1)
    Preview.AddBarCode "31694", prEAN13, lXpos, lYpos, lWidth, lHeight
    or straight in twips :

    Preview.AddBarCode "653754685529", prEAN13, 1000, 1000, 1500, 1000
    See also:

    Barcode site ->

    Come and visit :

    Download Attachment: [img]images/icon_paperclip.gif[/img] image2.gif
    17.64 KB

    Edited by - emiel on 07/27/2005 12:18:14
    Go to Bottom of Page
      Previous Topic: AddFrame - Method Topic Next Topic: AddReference - Method  
     New Topic  Topic Locked
     Printer Friendly
    Jump To:
    Print Preview ActiveX © Mandix Go To Top Of Page
    This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.02