first download and reffer the keepdynamic.dll
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using KeepDynamic;
using KeepDynamic.Barcode.Generator;
namespace WindowsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
BarCode B = new BarCode(); // creating an instance for barcode
B.SymbologyType = SymbologyType.Code128; //provideing type on encription symbols
B.CodeText = textBox1.Text; //data to convert into barcode
if (textBox1.Text != "")
{
SaveFileDialog s = new SaveFileDialog();//creating an instance for save file dialogbox
s.ShowDialog();
if(s.filename!="")
{
B.drawBarcode(s.FileName+".png");
MessageBox.Show("barcode is gemerated");
}
}
}
}
}
No comments:
Post a Comment