Nevron .NET Vision
User Interface for .NET / User's Guide / Barcodes / Usage Scenarios
In This Topic
    Usage Scenarios
    In This Topic

    Barcodes in Nevron .NET Vision are implemented as controls, so you can easily embed them in your applications and reports.

     Barcodes in Applications

    To show a linear or a 2D barcode in your application you should simply create a barcode control, set its properties and place it somewhere in you application. The following code demonstrates how to create and initialize an EAN13 linear barcode and place it in a form:

    Linear Barcode Widget
    Copy Code
    NLinearBarcode barcode = new NLinearBarcode();
    barcode.Symbology = ENLinearBarcodeSymbology.EAN13;
    barcode.Text = "0123456789012";
    barcode.AutoSize = true;
    barcode.Location = new Point(10, 10);

    This code results in the following barcode:


     Barcodes as Images

    Nevron .NET Vision's barcode library lets you easily create barcode images by using the proper barcode painter class. For example the code below creates a 2D barcode image by the QR code standard:

    QR Code Image
    Copy Code
    NMatrixBarcodePainter painter = new NMatrixBarcodePainter();
    painter.Symbology = ENMatrixBarcodeSymbology.QrCode;
    painter.Text = "";
    Bitmap bitmap = painter.CreateRaster(100, 100, 96);

    This code results in the following QR code image:

    See Also