Online Guide

For Using BC.NetBarcodeGenerator.Code39
Generate Code 39 barcodes to raster image files, Stream, Bitmap, Graphics, and HttpResponse in .NET, C#, VB.NET applications.

Guide Overview

Our .NET Code 39 Barcode Generator is desinged for C# & VB.NET programmers. It's easy to use BC.NetBarcodeGenerator.Code39 library to draw and generate Code 39 barcode in your .NET/C#/VB.NET Class, Console Application, .NET Windows Forms, and ASP.NET web projects. Please firstly download and get the free trial library of .NET Code 39 Barcode Generator (BC.NetBarcodeGenerator.Code39). And the only thing for integration is to add your project reference to our .NET Code 39 Barcode Generator dll.

BC.NetBarcodeGenerator.Code39

PLEASE NOTE, BC.NetBarcodeGenerator.Code39 only supports generating Code 39 symbology for C# & VB.NET applications. For creating all barcode symbologies, we provide BC.NetBarcodeGenerator.All that supports the most popular linear/1d barcodes and matrix/2d barcodes.

On this page, we provide .NET Code 39 Barcode Generator C# and VB.NET Class coding examples. You will quickly how to use BC.NetBarcodeGenerator.Code39 library to generate Code 39 and save barcodes to a local raster image file and Bitmap object. In addition, you can also save Code 39 barcodes to Stream, Graphics, and HttpResponse in .NET applications.

In addition to creating Code 39 barcodes in .NET Class, you can also create Code 39 in .NET Windows Forms, ASP.NET Web Forms, and IIS applications in other ways. Please click to see details. Moreover, ASP.NET web project and .NET Windows Forms project demos are included in our free trial package. Please download a free trial to see more.


Generating Code 39 in .NET/C#/VB.NET Class

1. This section shows how to create linear barcode Code 39 to a local raster image file on your disk in ASP.NET C# and VB.NET Class. Jpg, Jpeg, Tiff, Png, Bmp, and Gif formats are supported. Please firstly add your ASP.NET project reference to BC.NetBarcodeGeneratorTrial.Code39.dll.

Generate Code 39 in C# Class

using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BC.AspNetBarcodeGeneratorTrial.Code39;

namespace BCAspNetBarcodeGeneratorDemo
{
    public partial class _Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
                         
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Code39 barcode = new Code39();
            barcode.SetType = LinearType.Code39;
            barcode.SetData = "WWW.BARCODEBC.COM";
            barcode.SetUOM = UnitofMeasurement.Pixel;
            barcode.ApplyCheckDigit = false;
            barcode.IG = 1;
            barcode.SetDPI = 96;
            barcode.SetStartStopCharsVisible = false;
            barcode.SetWidetoNarrowXRatio = 2;
            barcode.AutoSize = false;
            barcode.SetColor = System.Drawing.Color.Red;
            barcode.SetFontColor = System.Drawing.Color.DarkBlue;
            barcode.SetFont = new Font("Arial", 10f, FontStyle.Bold);
            barcode.SetTextVisible = true;
            barcode.SetX = 1;
            barcode.SetY = 80;
            barcode.SetLeftSpace = 5;
            barcode.SetRightSpace = 5;
            barcode.SetTopSpace = 5;
            barcode.SetBottomSpace = 5;
            barcode.SetWidth = 300;
            barcode.SetHeight = 100;
            barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png;
            barcode.GenerateBarcode("F:\\test.png");

            //In addition to String, you can also output barcode to a Bitmap object, Stream object, Graphics object, HttpResponse object or byte array.
        }    
    }
}

Generate Code 39 in VB.NET Class

Imports System
Imports System.Drawing
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports BC.AspNetBarcodeGeneratorTrial.Code39

    Public Partial Class _Default
        Inherits Page

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        End Sub

        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
            Dim barcode As Code39 = New Code39()
            barcode.SetType = LinearType.Code39
            barcode.SetData = "WWW.BARCODEBC.COM"
            barcode.SetUOM = UnitofMeasurement.Pixel
            barcode.ApplyCheckDigit = False
            barcode.IG = 1
            barcode.SetDPI = 96
            barcode.SetStartStopCharsVisible = False
            barcode.SetWidetoNarrowXRatio = 2
            barcode.AutoSize = False
            barcode.SetColor = System.Drawing.Color.Red
            barcode.SetFontColor = System.Drawing.Color.DarkBlue
            barcode.SetFont = New Font("Arial", 10F, FontStyle.Bold)
            barcode.SetTextVisible = True
            barcode.SetX = 1
            barcode.SetY = 80
            barcode.SetLeftSpace = 5
            barcode.SetRightSpace = 5
            barcode.SetTopSpace = 5
            barcode.SetBottomSpace = 5
            barcode.SetWidth = 300
            barcode.SetHeight = 100
            barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png
            barcode.GenerateBarcode("F:\test.png")
            
           ‘In addition to String, you can also output barcode to a Bitmap object, Stream object, Graphics object, HttpResponse object or byte array.

       End Sub
    End Class

2. These .NET Class coding examples show how to load an image and generate Code 39 barcode symbology on it in .NET WinForms application. Please firstly add your .NET WinForms project reference to BC.NetBarcodeGeneratorTrial.Code39.dll. All barcodes properties reference is provided here.

Create Code 39 in C# Class

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 BC.NetWinBarcodeGeneratorTrial.Code39;

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

        private void button1_Click(object sender, EventArgs e)
        {
            Code39 barcode = new Code39();
            barcode.SetType = LinearType.Code39;
            barcode.SetData = "WWW.BARCODEBC.COM";
            barcode.SetUOM = UnitofMeasurement.Pixel;
            barcode.ApplyCheckDigit = false;
            barcode.IG = 1;
            barcode.SetDPI = 96;
            barcode.SetStartStopCharsVisible = false;
            barcode.SetWidetoNarrowXRatio = 2;
            barcode.AutoSize = false;
            barcode.SetColor = System.Drawing.Color.Red;
            barcode.SetFontColor = System.Drawing.Color.DarkBlue;
            barcode.SetFont = new Font("Arial", 10f, FontStyle.Bold);
            barcode.SetTextVisible = true;
            barcode.SetX = 1;
            barcode.SetY = 80;
            barcode.SetLeftSpace = 5;
            barcode.SetRightSpace = 5;
            barcode.SetTopSpace = 5;
            barcode.SetBottomSpace = 5;
            barcode.SetWidth = 300;
            barcode.SetHeight = 100;
            barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png;
            Image image = barcode.GenerateBarcode();
            pictureBox1.Image = image;

            //In addition to Bitmap object, you can also output barcode to a String, Stream object, Graphics object or byte array.
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
        }
    }
}

Create Code 39 VB.NET Class

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports BC.NetWinBarcodeGeneratorTrial.Code39

     Public Class BCNetWinBarcodeGeneratorDemo
        Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
            Dim barcode As Code39 = New Code39()
            barcode.SetType = LinearType.Code39
            barcode.SetData = "WWW.BARCODEBC.COM"
            barcode.SetUOM = UnitofMeasurement.Pixel
            barcode.ApplyCheckDigit = False
            barcode.IG = 1
            barcode.SetDPI = 96
            barcode.SetStartStopCharsVisible = False
            barcode.SetWidetoNarrowXRatio = 2
            barcode.AutoSize = False
            barcode.SetColor = System.Drawing.Color.Red
            barcode.SetFontColor = System.Drawing.Color.DarkBlue
            barcode.SetFont = New Font("Arial", 10F, FontStyle.Bold)
            barcode.SetTextVisible = True
            barcode.SetX = 1
            barcode.SetY = 80
            barcode.SetLeftSpace = 5
            barcode.SetRightSpace = 5
            barcode.SetTopSpace = 5
            barcode.SetBottomSpace = 5
            barcode.SetWidth = 300
            barcode.SetHeight = 100
            barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png
            Dim image As Image = barcode.GenerateBarcode()
            pictureBox1.Image = image

            ‘In addition to Bitmap object, you can also output barcode to a String, Stream object, Graphics object or byte array.

        End Sub  
    End Class


It is easy to find our .NET Code 39 Barcode Generator online. You can use these search phrase to find it, including but not limited to code 39 barcode generator c#, generate code 39 barcode with c#, c# barcode generator for code 39, generate code 39 barcode c# code project, generate code 39 barcode c# open source, generate code 39 barcode c# code, .net barcode generator code 39, create code 39barcode c#, code 39 barcode dll for c#, code 39 barcode sdk c#, generate code 39 barcode dll c#, c# barcode library open source, create code 39 barcode dll c# free, code 39 barcode .net component, free barcode library c#, c# free barcode library code 39, draw code 39 barcode in c#, and c# barcode library code 39 generator.




More Barcodes Generator Guide