Hi guys!

I have developed this simple dll for the barcode printing / representation, the use is very simple :

1

 

 

this is the code of the sample form:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BarcodeFree;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
           Code128 text = new Code128();
            this.textBox2.Text = text.Encode( textBox1.Text);
            ImageBarcode barcode, barcode2, barcode3, barcode4;
            //parameters to call ImageBarcode:
            //public ImageBarcode(int width, int height, string value, bool Landscape = false, Color? color = null,Color? colorFore=null )
        
            barcode = new ImageBarcode(pictureBox1.Width, pictureBox1.Height, textBox2.Text);
            barcode2 = new ImageBarcode(pictureBox2.Width, pictureBox2.Height, textBox2.Text, false, Color.Red, Color.Yellow );
            barcode3 = new ImageBarcode(pictureBox3.Width, pictureBox3.Height, textBox2.Text, true);
            barcode4 = new ImageBarcode(pictureBox4.Width, pictureBox4.Height, textBox2.Text, false, Color.Turquoise , Color.LightGray);
//            barcode = new ImageBarcode(250, 112, textBox2.Text);
            this.pictureBox1.Image = barcode.GenerateImage();
            this.pictureBox2.Image = barcode2.GenerateImage();
            this.pictureBox3.Image = barcode3.GenerateImage();
            this.pictureBox4.Image = barcode4.GenerateImage();
//            this.pictureBox1.Refresh();
        }
    }
}

And Finally the DLL( for demo test):

/images/BarcodeFree.dll

 

Some documentation about barcodes:

http://www.keyence.com/ss/products/auto_id/barcode_lecture/basic/code128/
http://www.jtbarton.com/Barcodes/BarcodeStringBuilderExample.aspx
http://www.jtbarton.com/Barcodes/BarcodeOverview.aspx
http://www.gs1.org/docs/barcodes/GS1_General_Specifications.pdf
 

 

especially thanks to:

http://grandzebu.net/informatique/codbar-en/code128.htm

Facebooktwitterredditpinterestlinkedinmail