:: Subscribe to our newsletter
 
Articles / Directory
02/10/2012
Latest version of TraderCode(v5.5) includes new Technical Analysis indicators, Point-and-Figure Charting and Strategy Backtesting.



1/04/2011
InvestmentCode, a comprehensive suite of
Financial calculators and models for Excel is now available.



9/01/2009
Launch of
Free Investment and Financial Calculator for Excel.



1/02/2009
Launch of NeuralCode(v1.0) for
Neural Networks Trading.



8/06/2008
Launch of ConnectCode Excel Training Courses. Get this
Free Excel Training (over 100 pages) now.



7/23/2008
ConnectCode Text Manager - add-in that enhances your productivity when working with text in Excel.



6/17/2008
ConnectCode Number Manager - add-in that enhances your productivity when working with numbers in Excel.



6/3/2008
ConnectCode Barcode Font Pack - enables barcodes in office applications and includes an add-in for Excel that supports mass generation of barcodes.



2/1/2008
Release of
SparkCode Professional - add-in for creating Dashboards in Excel with sparklines



12/15/2007
Announcing
ConnectCode Duplicate Remover - a powerful add-in for finding and removing duplicates entries in Excel



09/08/2007
Launch of
TinyGraphs - add in for creating sparklines and tiny charts in Excel.

Integrating Barcode Fonts With WPF (VB)

SampleFont_VB_WPF is a VB project written in the .NET 3 framework that demonstrates the integration of the ConnectCode DLL. The source code for SampleFont_VB_WPF is provided for download below and requires Visual Studio 2005 or later to compile.

The following is a screenshot of the sample in Vista.



Download

Download the SampleFont_VB_WPF.zip executable and source code.

The ConnectCode Barcode Font DLL and the source for the SampleFont_VB_WPF 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.

Additional Requirements -

The following needs to be installed on the user's machine for successful compilation and execution.



Steps for integrating the DLL with Windows Presentation Foundation (Visual Basic)

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_Code128Auto(inputstr, 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_Code128Auto, then the font to choose should be CCode128_S3. (If you are developing with the Trial version of ConnectCode Font Pack, the font to choose would be CCCode128_S3_Trial instead)


 

The SampleFont_VB_WPF 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.


DLLImport Statements for Visual Basic .NET

Copy the following block of statements into your VB .NET project to integrate with the DLL. To use DLLImport statements in your project, you will need to import the System.Runtime.InteropServices namespace. 

Imports System.Runtime.InteropServices

The connectcodefont.dll file has to be placed in the same folder as the executable for it to load properly. 

 

<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code128Auto(ByVal instr As String, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code39(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_POSTNET(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code93(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Codabar(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code39Ascii(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_I2of5(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_ITF14(ByVal instr As String, ByVal checkdigit As Integer, ByVal bearer As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Industrial2of5(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_ModifiedPlessy(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_EAN13(ByVal instr As String, ByVal humantext As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function RetrieveOptionalString_EAN13(ByVal instr As String, ByVal humantext As Integer, ByVal strtype As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_UPCA(ByVal instr As String, ByVal humantext As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_EAN8(ByVal instr As String, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_UCCEAN(ByVal instr As String, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code128A(ByVal instr As String, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code128B(ByVal instr As String, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code128C(ByVal instr As String, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_UPCE(ByVal instr As String, ByVal humantext As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_EXT2(ByVal instr As String, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer

End Function
<DllImport("connectcodefont.dll")> _ Public Shared Function
Encode_EXT5(ByVal instr As String, ByVal outstr As System.Text.StringBuilder,
ByVal outstrmax As Integer) As Integer

End Function




 

Copyright (c) 2007-2015, ConnectCode Pte Ltd. All Rights Reserved.


Trademark Acknowledgements

Microsoft and Microsoft Excel are registered trademarks of Microsoft Corporation. All other product names are trademarks, registered trademarks, or service marks of their respective owners