Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

Get Started - Generate a QR Code

  • 2 minutes to read


You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use these examples in production code. Refer to the DevExpress Subscription page for pricing information.

To get started with a Barcode Generation API, perform the following steps.

  1. Create a new Windows Forms Application project.
  2. Add reference to the DevExpress.Docs.v19.1.dll and the DevExpress.Data.v19.1.dll assemblies.
  3. Drag a Button from the Toolbox and drop it on the form. Drag a PictureBox from the Toolbox and drop it on the form.
  4. Insert the code listed below into the method that handles the Click button event.

    using DevExpress.BarCodes;
    this.pictureBox1.Image = null;
    BarCode barCode = new BarCode();
    barCode.Symbology = Symbology.QRCode;
    barCode.CodeText = "";
    barCode.BackColor = Color.White;
    barCode.ForeColor = Color.Black;
    barCode.RotationAngle = 0;
    barCode.CodeBinaryData = Encoding.Default.GetBytes(barCode.CodeText);
    barCode.Options.QRCode.CompactionMode = QRCodeCompactionMode.Byte;
    barCode.Options.QRCode.ErrorLevel = QRCodeErrorLevel.Q;
    barCode.Options.QRCode.ShowCodeText = false;
    barCode.DpiX = 72;
    barCode.DpiY = 72;
    barCode.Module = 2f;
    this.pictureBox1.Image = barCode.BarCodeImage;
    pictureBox1.Size = pictureBox1.Image.Size;
  5. Run the project and click the button. See the resulting QR barcode in the PictureBox control.
See Also