Key in your email here
Font Products
 Barcode Fonts
  • Code 39 Barcode
  • Code 128 Barcode
  • UCCEAN Barcode
  • ITF14 Barcode
  • I2of5 Barcode
  • UPC/EAN Barcode
  • GS1 Databar Barcode
 Download ConnectCode
 MICR Fonts
  • MICR E13B
  • MICR CMC7
 Download MICR

Using the Fonts
  • With the Font Encoder
  • With Excel
  • With Access
  • With Word
  • With Crystal Reports
  • Application Integration
     • With C#
     • With Visual Basic
     • With WPF (C#)
     • With WPF (VB)
     • With Visual C++

SDK Products
 .Net Barcode SDK
 Download SDK

Software Products
 Barcode Software Imager
 Download Imager


Barcode FAQ
 Barcode
  • Barcode Symbology
  • Barcode FAQ
  • Barcode Images
  • Barcode Font
 RFID
  • What is RFID?
 Thermal Printers
 Barcode Scanners
 OCR & OCR Fonts
 MICR & MICR Fonts

Barcode Resources
 Web Resources
 The Barcode CD Project
 Mobile Barcode Project



VB .NET Integration With DLL

TestFontVB is a VB (.NET 2) project that demonstrates the integration of the ConnectCode DLL with  Visual Basic . The source code for TestFontVB is provided in the download below and requires Visual Studio 2005 or later to compile. For the barcodes to be properly displayed, the trial version of ConnectCode Barcode Font Pack has to be installed .

The following is a screenshot of the sample in Vista.



Download

Download the TestFontVB.zip executable and source code.

The ConnectCode Barcode Fonts DLL and the source for the TestFontVB sample are free to use and can be compiled and distributed with users' applications as long as they are being used with any one of the registered barcode font packs. Redistribution of ConnectCode's fonts will, however, require a Distribution or Unlimited Distribution License.

Steps for integrating the DLL into your VB .NET Project

1) Make sure the namespace System.Runtime.InteropServices is imported into your project

Imports System.Runtime.InteropServices

2) Copy the DLLImport statements for connectcodefont.dll into your project.

3) Make calls to the DLL to encode the input data. For example

Dim inputstr As String
Dim outputstr As System.Text.StringBuilder
inputstr = "12345678"
Encode_Code39(inputstr, 0, outputstr, outputstr.Capacity)

The result will be stored in the outputstr variable. 

4) Set the font of the outputstr to the appropriate barcode font. For example, if you are using Encode_Code39, then the font to choose should be CCode39_S3. (If you are developing with the Trial version of ConnectCode Font Pack, the font to choose would be CCCode39_S3_Trial instead)


 

The TestFontVB sample includes all the above steps in a short and easy to understand program.

Note that the barcodes generated with the Trial version of ConnectCode Font Pack will have horizontal lines across them.

 

Copyright (C) 2004-2005, BarcodeResource.com. All Rights Reserved.