QR Code Generator
QR Code Generator using VB.NET
Project Outline: QR Code Generator
The QR code generator using VB.NET is a program that helps users to create QR codes quickly and easily. QR code generator can be used to create codes for a variety of purposes, including marketing and advertising, tracking inventory, and collecting customer data. The codes can be printed out and used as physical or digital signage. QR code generator is also useful for creating QR codes for websites and applications.
To use QR code generator, first open the software and select the type of code you want to create. Next, enter the desired information into the text fields and click the “Generate” button. The generated code will be displayed in the window. You can copy the code or save it to a file for later use.
This simple program can be used in various ways including an inventory system; to generate QR Code for products and items. Restaurant menu; to generate QR code for food and drinks menu for customers. The system can making access information easier and provide a better experience for users.
Main Feature of the QR Code generator
- Used In Generating QR Codes for Menus, Lists, Records, and more.
- Export of the generated QR Code as an Image to be used.
- Tools used include Picture box and button.
Library: QR Code Generator
MessagingToolkit.QRCode
The code below was implemented to generate QR Code from the text entered and display the code in a Picture Box.
Private Sub btnGenerate_Click(sender As Object, e As EventArgs) Handles btnGenerate.Click
Try
Call qrcodeGen()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub qrcodeGen()
Try
Dim qrCode As New QRCodeEncoder
qrCode.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE
qrCode.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.L
Me.PictureBox1.Image = qrCode.Encode(Me.txtCode.Text, System.Text.Encoding.UTF8)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
This code below is used to export the QR code as an Image and automatically saving it to your folder.
Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click
Try
If Me.PictureBox1.Image IsNot Nothing Then
Me.PictureBox1.Image.Save(IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.MyDocuments, Me.txtCode.Text & ".jpg"))
MessageBox.Show("QR is successfully saved.")
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Installation Guide of QR Code Generator
- Download and Install Microsoft Visual Studio Software.
- Download the attached source code zip file. ( find the download button below)
- After download, extract the download zip file to your preferred folder.
- Locate the Solution file in the extracted source code. The file is named “QR Code Generator.sln”.
- Open the solution file with your MS Visual Studio Software.
- Press the “F5” key on your keyboard to run the Program.
Recommended Tutorial: Inventory System using C# For Free